From 22f5f5c7e32b043433103edb404bfbe43effa15d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 May 2011 22:50:07 +0000 Subject: Add base_uri parameter to sord_read_file. Add sord_write_writer. Use command line base URI in sordi if given. Use correct output style options for output syntax in sordi. Use sord_write_writer in sordi instead of manual writing code. Abbreviate serialised model output for Turtle. Preserve UTF-8 length information for nodes from Serd. Use string lengths not including terminator (match new Serd). Add test suite. git-svn-id: http://svn.drobilla.net/sord/trunk@111 3d64ff67-21c5-427c-a301-fe4f08042e5a --- tests/manifest.ttl | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 tests/manifest.ttl (limited to 'tests/manifest.ttl') diff --git a/tests/manifest.ttl b/tests/manifest.ttl new file mode 100644 index 0000000..6a2cae2 --- /dev/null +++ b/tests/manifest.ttl @@ -0,0 +1,215 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . + +<> rdf:type mf:Manifest ; + rdfs:comment "Turtle good syntax test cases (must pass)" ; + mf:entries + ( + [ mf:name "test-00" ; + rdfs:comment "Blank subject" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-01" ; + rdfs:comment "@prefix and qnames" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-02" ; + rdfs:comment ", operator" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-03" ; + rdfs:comment "; operator" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-04" ; + rdfs:comment "empty [] as subject and object" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-05" ; + rdfs:comment "non-empty [] as subject and object" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-06" ; + rdfs:comment "'a' as predicate" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-07" ; + rdfs:comment "simple collection" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-08" ; + rdfs:comment "empty collection" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-09" ; + rdfs:comment "integer datatyped literal" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-10" ; + rdfs:comment "decimal integer canonicalization" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-11" ; + rdfs:comment "- and _ in names and qnames" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-12" ; + rdfs:comment "tests for rdf:_ and other qnames starting with _" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-13" ; + rdfs:comment "bare : allowed" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-14" ; + rdfs:comment "10000 triples, more than the default Bison stack size" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-15" ; + rdfs:comment "10000 triple objects (10000 triples)" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-16" ; + rdfs:comment "10000 items (10000 triples)" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-17" ; + rdfs:comment "simple long literal" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-18" ; + rdfs:comment "long literals with escapes" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-19" ; + rdfs:comment "floating point number" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-20" ; + rdfs:comment "empty literals, normal and long variant" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-21" ; + rdfs:comment "positive integer, decimal and doubles" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-22" ; + rdfs:comment "negative integer, decimal and doubles" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-23" ; + rdfs:comment "long literal ending in double quote" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-24" ; + rdfs:comment "boolean literals" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-25" ; + rdfs:comment "comments" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-26" ; + rdfs:comment "no final mewline" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-27" ; + rdfs:comment "duplicate prefix" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-28" ; + rdfs:comment "decimal data types (serializing test)" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-29" ; + rdfs:comment "Escaping U+0001 to U+007F in a URI" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "test-30" ; + rdfs:comment "@base" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "rdf-schema" ; + rdfs:comment "RDF Namespace document converted into Turtle" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "rdfs-namespace" ; + rdfs:comment "RDFS Namespace document converted into Turtle" ; + mf:action [ qt:data ] ; + mf:result + ] + + [ mf:name "rdfq-results" ; + rdfs:comment "Example query result from http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html" ; + mf:action [ qt:data ] ; + mf:result + ] + + # End of tests + ). -- cgit v1.2.1