diff options
Diffstat (limited to 'tests/tests-ttl')
-rw-r--r-- | tests/tests-ttl/LICENSE | 2 | ||||
-rw-r--r-- | tests/tests-ttl/manifest.ttl | 725 | ||||
-rw-r--r-- | tests/tests-ttl/turtle-subm-27.ttl | 2 | ||||
-rw-r--r-- | tests/tests-ttl/turtle-syntax-bad-base-03.ttl | 2 | ||||
-rw-r--r-- | tests/tests-ttl/turtle-syntax-base-02.ttl | 1 | ||||
-rw-r--r-- | tests/tests-ttl/turtle-syntax-base-04.ttl | 2 | ||||
-rw-r--r-- | tests/tests-ttl/turtle-syntax-prefix-02.ttl | 1 | ||||
-rw-r--r-- | tests/tests-ttl/turtle-syntax-prefix-03.ttl | 2 |
8 files changed, 703 insertions, 34 deletions
diff --git a/tests/tests-ttl/LICENSE b/tests/tests-ttl/LICENSE index 35eb3db2..c4172201 100644 --- a/tests/tests-ttl/LICENSE +++ b/tests/tests-ttl/LICENSE @@ -1,4 +1,4 @@ -## License for RDF 1.1 Trutle test Suite. +## License for RDF 1.1 Turtle test Suite. ## ## By obtaining, using and/or copying this work, you (the licensee) agree that ## you have read, understood, and will comply with the following terms and diff --git a/tests/tests-ttl/manifest.ttl b/tests/tests-ttl/manifest.ttl index f149f451..3aee41ae 100644 --- a/tests/tests-ttl/manifest.ttl +++ b/tests/tests-ttl/manifest.ttl @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Test named *subm* are (c) W3C and taken from the Trutle submission. +# Test named *subm* are (c) W3C and taken from the Turtle submission. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @@ -26,6 +26,82 @@ rdfs:comment "Turtle tests" ; mf:entries ( + + # atomic tests + <#IRI_subject> + <#IRI_with_four_digit_numeric_escape> + <#IRI_with_eight_digit_numeric_escape> + <#IRI_with_all_punctuation> + <#bareword_a_predicate> + <#old_style_prefix> + <#prefixed_IRI_predicate> + <#prefixed_IRI_object> + <#prefix_only_IRI> + <#default_namespace_IRI> + <#prefix_reassigned_and_used> + <#percent_escaped_localName> + <#HYPHEN_MINUS_in_localName> + <#underscore_in_localName> + <#localname_with_COLON> + <#localName_with_leading_underscore> + <#localName_with_leading_digit> + <#old_style_base> + <#labeled_blank_node_subject> + <#labeled_blank_node_object> + <#labeled_blank_node_with_leading_underscore> + <#labeled_blank_node_with_leading_digit> + <#labeled_blank_node_with_non_leading_extras> + <#anonymous_blank_node_subject> + <#anonymous_blank_node_object> + <#sole_blankNodePropertyList> + <#blankNodePropertyList_as_subject> + <#blankNodePropertyList_as_object> + <#blankNodePropertyList_with_multiple_triples> + <#nested_blankNodePropertyLists> + <#empty_collection> + <#nested_collection> + <#last> + <#LITERAL1> + <#LITERAL_LONG1> + <#LITERAL_LONG1_with_1_squote> + <#LITERAL_LONG1_with_2_squotes> + <#LITERAL2> + <#LITERAL_LONG2> + <#LITERAL_LONG2_with_1_squote> + <#LITERAL_LONG2_with_2_squotes> + <#literal_with_CHARACTER_TABULATION> + <#literal_with_BACKSPACE> + <#literal_with_LINE_FEED> + <#literal_with_CARRIAGE_RETURN> + <#literal_with_FORM_FEED> + <#literal_with_REVERSE_SOLIDUS> + <#literal_with_escaped_CHARACTER_TABULATION> + <#literal_with_escaped_BACKSPACE> + <#literal_with_escaped_LINE_FEED> + <#literal_with_escaped_CARRIAGE_RETURN> + <#literal_with_escaped_FORM_FEED> + <#literal_with_numeric_escape4> + <#literal_with_numeric_escape8> + <#IRIREF_datatype> + <#prefixed_name_datatype> + <#bareword_integer> + <#bareword_decimal> + <#bareword_double> + <#double_lower_case_e> + <#negative_numeric> + <#positive_numeric> + <#numeric_with_leading_0> + <#literal_true> + <#literal_false> + <#langtagged_non_LONG> + <#langtagged_LONG> + <#lantag_with_subtag> + <#objectList_with_two_objects> + <#predicateObjectList_with_two_objectLists> + <#repeated_semis_at_end> + <#repeated_semis_not_at_end> + + # original tests-ttl <#turtle-syntax-file-01> <#turtle-syntax-file-02> <#turtle-syntax-file-03> @@ -200,8 +276,529 @@ <#turtle-eval-bad-02> <#turtle-eval-bad-03> <#turtle-eval-bad-04> + + # tests from Dave Beckett + # http://www.w3.org/2011/rdf-wg/wiki/Turtle_Candidate_Recommendation_Comments#c28 + <#LITERAL_LONG2_with_REVERSE_SOLIDUS> + <#turtle-syntax-bad-LITERAL2_with_langtag_and_datatype> + <#two_LITERAL_LONG2s> + + # tests from David Robillard + # http://www.w3.org/2011/rdf-wg/wiki/Turtle_Candidate_Recommendation_Comments#c21 + <#turtle-syntax-bad-blank-label-dot-end> + <#turtle-syntax-bad-ln-dash-start> + <#turtle-syntax-bad-ln-escape-start> + <#turtle-syntax-bad-ln-escape> + <#turtle-syntax-bad-missing-ns-dot-end> + <#turtle-syntax-bad-missing-ns-dot-start> + <#turtle-syntax-bad-ns-dot-end> + <#turtle-syntax-bad-ns-dot-start> + <#turtle-syntax-bad-number-dot-in-anon> + <#turtle-syntax-blank-label> + <#turtle-syntax-ln-colons> + <#turtle-syntax-ln-dots> + <#turtle-syntax-ns-dots> ) . +# atomic tests +<#IRI_subject> rdf:type rdft:TestTurtleEval ; + mf:name "IRI_subject" ; + rdfs:comment "IRI subject" ; + mf:action <IRI_subject.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#IRI_with_four_digit_numeric_escape> rdf:type rdft:TestTurtleEval ; + mf:name "IRI_with_four_digit_numeric_escape" ; + rdfs:comment "IRI with four digit numeric escape (\\u)" ; + mf:action <IRI_with_four_digit_numeric_escape.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#IRI_with_eight_digit_numeric_escape> rdf:type rdft:TestTurtleEval ; + mf:name "IRI_with_eight_digit_numeric_escape" ; + rdfs:comment "IRI with eight digit numeric escape (\\U)" ; + mf:action <IRI_with_eight_digit_numeric_escape.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#IRI_with_all_punctuation> rdf:type rdft:TestTurtleEval ; + mf:name "IRI_with_all_punctuation" ; + rdfs:comment "IRI with all punctuation" ; + mf:action <IRI_with_all_punctuation.ttl> ; + mf:result <IRI_with_all_punctuation.nt> ; + . + +<#bareword_a_predicate> rdf:type rdft:TestTurtleEval ; + mf:name "bareword_a_predicate" ; + rdfs:comment "bareword a predicate" ; + mf:action <bareword_a_predicate.ttl> ; + mf:result <bareword_a_predicate.nt> ; + . + +<#old_style_prefix> rdf:type rdft:TestTurtleEval ; + mf:name "old_style_prefix" ; + rdfs:comment "old-style prefix" ; + mf:action <old_style_prefix.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#prefixed_IRI_predicate> rdf:type rdft:TestTurtleEval ; + mf:name "prefixed_IRI_predicate" ; + rdfs:comment "prefixed IRI predicate" ; + mf:action <prefixed_IRI_predicate.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#prefixed_IRI_object> rdf:type rdft:TestTurtleEval ; + mf:name "prefixed_IRI_object" ; + rdfs:comment "prefixed IRI object" ; + mf:action <prefixed_IRI_object.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#prefix_only_IRI> rdf:type rdft:TestTurtleEval ; + mf:name "prefix_only_IRI" ; + rdfs:comment "prefix-only IRI (p:)" ; + mf:action <prefix_only_IRI.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#default_namespace_IRI> rdf:type rdft:TestTurtleEval ; + mf:name "default_namespace_IRI" ; + rdfs:comment "default namespace IRI (:ln)" ; + mf:action <default_namespace_IRI.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#prefix_reassigned_and_used> rdf:type rdft:TestTurtleEval ; + mf:name "prefix_reassigned_and_used" ; + rdfs:comment "prefix reassigned and used" ; + mf:action <prefix_reassigned_and_used.ttl> ; + mf:result <prefix_reassigned_and_used.nt> ; + . + +<#percent_escaped_localName> rdf:type rdft:TestTurtleEval ; + mf:name "percent_escaped_localName" ; + rdfs:comment "percent-escaped local name" ; + mf:action <percent_escaped_localName.ttl> ; + mf:result <percent_escaped_localName.nt> ; + . + +<#HYPHEN_MINUS_in_localName> rdf:type rdft:TestTurtleEval ; + mf:name "HYPHEN_MINUS_in_localName" ; + rdfs:comment "HYPHEN-MINUS in local name" ; + mf:action <HYPHEN_MINUS_in_localName.ttl> ; + mf:result <HYPHEN_MINUS_in_localName.nt> ; + . + +<#underscore_in_localName> rdf:type rdft:TestTurtleEval ; + mf:name "underscore_in_localName" ; + rdfs:comment "underscore in local name" ; + mf:action <underscore_in_localName.ttl> ; + mf:result <underscore_in_localName.nt> ; + . + +<#localname_with_COLON> rdf:type rdft:TestTurtleEval ; + mf:name "localname_with_COLON" ; + rdfs:comment "localname with COLON" ; + mf:action <localname_with_COLON.ttl> ; + mf:result <localname_with_COLON.nt> ; + . + +<#localName_with_leading_underscore> rdf:type rdft:TestTurtleEval ; + mf:name "localName_with_leading_underscore" ; + rdfs:comment "localName with leading underscore (p:_)" ; + mf:action <localName_with_leading_underscore.ttl> ; + mf:result <localName_with_leading_underscore.nt> ; + . + +<#localName_with_leading_digit> rdf:type rdft:TestTurtleEval ; + mf:name "localName_with_leading_digit" ; + rdfs:comment "localName with leading digit (p:_)" ; + mf:action <localName_with_leading_digit.ttl> ; + mf:result <localName_with_leading_digit.nt> ; + . + +<#old_style_base> rdf:type rdft:TestTurtleEval ; + mf:name "old_style_base" ; + rdfs:comment "old-style base" ; + mf:action <old_style_base.ttl> ; + mf:result <IRI_spo.nt> ; + . + +<#labeled_blank_node_subject> rdf:type rdft:TestTurtleEval ; + mf:name "labeled_blank_node_subject" ; + rdfs:comment "labeled blank node subject" ; + mf:action <labeled_blank_node_subject.ttl> ; + mf:result <labeled_blank_node_subject.nt> ; + . + +<#labeled_blank_node_object> rdf:type rdft:TestTurtleEval ; + mf:name "labeled_blank_node_object" ; + rdfs:comment "labeled blank node object" ; + mf:action <labeled_blank_node_object.ttl> ; + mf:result <labeled_blank_node_object.nt> ; + . + +<#labeled_blank_node_with_leading_underscore> rdf:type rdft:TestTurtleEval ; + mf:name "labeled_blank_node_with_leading_underscore" ; + rdfs:comment "labeled blank node with_leading_underscore (_:_)" ; + mf:action <labeled_blank_node_with_leading_underscore.ttl> ; + mf:result <labeled_blank_node_with_leading_underscore.nt> ; + . + +<#labeled_blank_node_with_leading_digit> rdf:type rdft:TestTurtleEval ; + mf:name "labeled_blank_node_with_leading_digit" ; + rdfs:comment "labeled blank node with_leading_digit (_:0)" ; + mf:action <labeled_blank_node_with_leading_digit.ttl> ; + mf:result <labeled_blank_node_with_leading_digit.nt> ; + . + +<#anonymous_blank_node_subject> rdf:type rdft:TestTurtleEval ; + mf:name "anonymous_blank_node_subject" ; + rdfs:comment "anonymous blank node subject" ; + mf:action <anonymous_blank_node_subject.ttl> ; + mf:result <anonymous_blank_node_subject.nt> ; + . + +<#anonymous_blank_node_object> rdf:type rdft:TestTurtleEval ; + mf:name "anonymous_blank_node_object" ; + rdfs:comment "anonymous blank node object" ; + mf:action <anonymous_blank_node_object.ttl> ; + mf:result <anonymous_blank_node_object.nt> ; + . + +<#sole_blankNodePropertyList> rdf:type rdft:TestTurtleEval ; + mf:name "sole_blankNodePropertyList" ; + rdfs:comment "sole blankNodePropertyList [ <p> <o> ] ." ; + mf:action <sole_blankNodePropertyList.ttl> ; + mf:result <sole_blankNodePropertyList.nt> ; + . + +<#blankNodePropertyList_as_subject> rdf:type rdft:TestTurtleEval ; + mf:name "blankNodePropertyList_as_subject" ; + rdfs:comment "blankNodePropertyList as subject [ … ] <p> <o> ." ; + mf:action <blankNodePropertyList_as_subject.ttl> ; + mf:result <blankNodePropertyList_as_subject.nt> ; + . + +<#blankNodePropertyList_as_object> rdf:type rdft:TestTurtleEval ; + mf:name "blankNodePropertyList_as_object" ; + rdfs:comment "blankNodePropertyList as object <s> <p> [ … ] ." ; + mf:action <blankNodePropertyList_as_object.ttl> ; + mf:result <blankNodePropertyList_as_object.nt> ; + . + +<#blankNodePropertyList_with_multiple_triples> rdf:type rdft:TestTurtleEval ; + mf:name "blankNodePropertyList_with_multiple_triples" ; + rdfs:comment "blankNodePropertyList with multiple triples [ <s> <p> ; <s2> <p2> ]" ; + mf:action <blankNodePropertyList_with_multiple_triples.ttl> ; + mf:result <blankNodePropertyList_with_multiple_triples.nt> ; + . + +<#nested_blankNodePropertyLists> rdf:type rdft:TestTurtleEval ; + mf:name "nested_blankNodePropertyLists" ; + rdfs:comment "nested blankNodePropertyLists [ <p1> [ <p2> <o2> ] ; <p3> <o3> ]" ; + mf:action <nested_blankNodePropertyLists.ttl> ; + mf:result <nested_blankNodePropertyLists.nt> ; + . + +<#empty_collection> rdf:type rdft:TestTurtleEval ; + mf:name "empty_collection" ; + rdfs:comment "empty collection ()" ; + mf:action <empty_collection.ttl> ; + mf:result <empty_collection.nt> ; + . + +<#nested_collection> rdf:type rdft:TestTurtleEval ; + mf:name "nested_collection" ; + rdfs:comment "nested collection (())" ; + mf:action <nested_collection.ttl> ; + mf:result <nested_collection.nt> ; + . + +<#last> rdf:type rdft:TestTurtleEval ; + mf:name "last" ; + rdfs:comment "last, not first, non-empty nested collection" ; + mf:action <last.ttl> ; + mf:result <last.nt> ; + . + +<#LITERAL1> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL1" ; + rdfs:comment "LITERAL1 'x'" ; + mf:action <LITERAL1.ttl> ; + mf:result <LITERAL1.nt> ; + . + +<#LITERAL_LONG1> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL_LONG1" ; + rdfs:comment "LITERAL_LONG1 '''x'''" ; + mf:action <LITERAL_LONG1.ttl> ; + mf:result <LITERAL1.nt> ; + . + +<#LITERAL_LONG1_with_1_squote> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL_LONG1_with_1_squote" ; + rdfs:comment "LITERAL_LONG1 with 1 squote '''a'b'''" ; + mf:action <LITERAL_LONG1_with_1_squote.ttl> ; + mf:result <LITERAL_LONG1_with_1_squote.nt> ; + . + +<#LITERAL_LONG1_with_2_squotes> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL_LONG1_with_2_squotes" ; + rdfs:comment "LITERAL_LONG1 with 2 squotes '''a''b'''" ; + mf:action <LITERAL_LONG1_with_2_squotes.ttl> ; + mf:result <LITERAL_LONG1_with_2_squotes.nt> ; + . + +<#LITERAL2> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL2" ; + rdfs:comment "LITERAL2 \"x\"" ; + mf:action <LITERAL2.ttl> ; + mf:result <LITERAL1.nt> ; + . + +<#LITERAL_LONG2> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL_LONG2" ; + rdfs:comment "LITERAL_LONG2 \"\"\"x\"\"\"" ; + mf:action <LITERAL_LONG2.ttl> ; + mf:result <LITERAL1.nt> ; + . + +<#LITERAL_LONG2_with_1_squote> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL_LONG2_with_1_squote" ; + rdfs:comment "LITERAL_LONG2 with 1 squote \"\"\"a\"b\"\"\"" ; + mf:action <LITERAL_LONG2_with_1_squote.ttl> ; + mf:result <LITERAL_LONG2_with_1_squote.nt> ; + . + +<#LITERAL_LONG2_with_2_squotes> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL_LONG2_with_2_squotes" ; + rdfs:comment "LITERAL_LONG2 with 2 squotes \"\"\"a\"\"b\"\"\"" ; + mf:action <LITERAL_LONG2_with_2_squotes.ttl> ; + mf:result <LITERAL_LONG2_with_2_squotes.nt> ; + . + +<#literal_with_CHARACTER_TABULATION> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_CHARACTER_TABULATION" ; + rdfs:comment "literal with CHARACTER TABULATION" ; + mf:action <literal_with_CHARACTER_TABULATION.ttl> ; + mf:result <literal_with_CHARACTER_TABULATION.nt> ; + . + +<#literal_with_BACKSPACE> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_BACKSPACE" ; + rdfs:comment "literal with BACKSPACE" ; + mf:action <literal_with_BACKSPACE.ttl> ; + mf:result <literal_with_BACKSPACE.nt> ; + . + +<#literal_with_LINE_FEED> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_LINE_FEED" ; + rdfs:comment "literal with LINE FEED" ; + mf:action <literal_with_LINE_FEED.ttl> ; + mf:result <literal_with_LINE_FEED.nt> ; + . + +<#literal_with_CARRIAGE_RETURN> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_CARRIAGE_RETURN" ; + rdfs:comment "literal with CARRIAGE RETURN" ; + mf:action <literal_with_CARRIAGE_RETURN.ttl> ; + mf:result <literal_with_CARRIAGE_RETURN.nt> ; + . + +<#literal_with_FORM_FEED> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_FORM_FEED" ; + rdfs:comment "literal with FORM FEED" ; + mf:action <literal_with_FORM_FEED.ttl> ; + mf:result <literal_with_FORM_FEED.nt> ; + . + +<#literal_with_REVERSE_SOLIDUS> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_REVERSE_SOLIDUS" ; + rdfs:comment "literal with REVERSE SOLIDUS" ; + mf:action <literal_with_REVERSE_SOLIDUS.ttl> ; + mf:result <literal_with_REVERSE_SOLIDUS.nt> ; + . + +<#literal_with_escaped_CHARACTER_TABULATION> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_escaped_CHARACTER_TABULATION" ; + rdfs:comment "literal with escaped CHARACTER TABULATION" ; + mf:action <literal_with_escaped_CHARACTER_TABULATION.ttl> ; + mf:result <literal_with_CHARACTER_TABULATION.nt> ; + . + +<#literal_with_escaped_BACKSPACE> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_escaped_BACKSPACE" ; + rdfs:comment "literal with escaped BACKSPACE" ; + mf:action <literal_with_escaped_BACKSPACE.ttl> ; + mf:result <literal_with_BACKSPACE.nt> ; + . + +<#literal_with_escaped_LINE_FEED> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_escaped_LINE_FEED" ; + rdfs:comment "literal with escaped LINE FEED" ; + mf:action <literal_with_escaped_LINE_FEED.ttl> ; + mf:result <literal_with_LINE_FEED.nt> ; + . + +<#literal_with_escaped_CARRIAGE_RETURN> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_escaped_CARRIAGE_RETURN" ; + rdfs:comment "literal with escaped CARRIAGE RETURN" ; + mf:action <literal_with_escaped_CARRIAGE_RETURN.ttl> ; + mf:result <literal_with_CARRIAGE_RETURN.nt> ; + . + +<#literal_with_escaped_FORM_FEED> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_escaped_FORM_FEED" ; + rdfs:comment "literal with escaped FORM FEED" ; + mf:action <literal_with_escaped_FORM_FEED.ttl> ; + mf:result <literal_with_FORM_FEED.nt> ; + . + +<#literal_with_numeric_escape4> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_numeric_escape4" ; + rdfs:comment "literal with numeric escape4 \\u" ; + mf:action <literal_with_numeric_escape4.ttl> ; + mf:result <literal_with_numeric_escape4.nt> ; + . + +<#literal_with_numeric_escape8> rdf:type rdft:TestTurtleEval ; + mf:name "literal_with_numeric_escape8" ; + rdfs:comment "literal with numeric escape8 \\U" ; + mf:action <literal_with_numeric_escape8.ttl> ; + mf:result <literal_with_numeric_escape4.nt> ; + . + +<#IRIREF_datatype> rdf:type rdft:TestTurtleEval ; + mf:name "IRIREF_datatype" ; + rdfs:comment "IRIREF datatype \"\"^^<t>" ; + mf:action <IRIREF_datatype.ttl> ; + mf:result <IRIREF_datatype.nt> ; + . + +<#prefixed_name_datatype> rdf:type rdft:TestTurtleEval ; + mf:name "prefixed_name_datatype" ; + rdfs:comment "prefixed name datatype \"\"^^p:t" ; + mf:action <prefixed_name_datatype.ttl> ; + mf:result <IRIREF_datatype.nt> ; + . + +<#bareword_integer> rdf:type rdft:TestTurtleEval ; + mf:name "bareword_integer" ; + rdfs:comment "bareword integer" ; + mf:action <bareword_integer.ttl> ; + mf:result <IRIREF_datatype.nt> ; + . + +<#bareword_decimal> rdf:type rdft:TestTurtleEval ; + mf:name "bareword_decimal" ; + rdfs:comment "bareword decimal" ; + mf:action <bareword_decimal.ttl> ; + mf:result <bareword_decimal.nt> ; + . + +<#bareword_double> rdf:type rdft:TestTurtleEval ; + mf:name "bareword_double" ; + rdfs:comment "bareword double" ; + mf:action <bareword_double.ttl> ; + mf:result <bareword_double.nt> ; + . + +<#double_lower_case_e> rdf:type rdft:TestTurtleEval ; + mf:name "double_lower_case_e" ; + rdfs:comment "double lower case e" ; + mf:action <double_lower_case_e.ttl> ; + mf:result <double_lower_case_e.nt> ; + . + +<#negative_numeric> rdf:type rdft:TestTurtleEval ; + mf:name "negative_numeric" ; + rdfs:comment "negative numeric" ; + mf:action <negative_numeric.ttl> ; + mf:result <negative_numeric.nt> ; + . + +<#positive_numeric> rdf:type rdft:TestTurtleEval ; + mf:name "positive_numeric" ; + rdfs:comment "positive numeric" ; + mf:action <positive_numeric.ttl> ; + mf:result <positive_numeric.nt> ; + . + +<#numeric_with_leading_0> rdf:type rdft:TestTurtleEval ; + mf:name "numeric_with_leading_0" ; + rdfs:comment "numeric with leading 0" ; + mf:action <numeric_with_leading_0.ttl> ; + mf:result <numeric_with_leading_0.nt> ; + . + +<#literal_true> rdf:type rdft:TestTurtleEval ; + mf:name "literal_true" ; + rdfs:comment "literal true" ; + mf:action <literal_true.ttl> ; + mf:result <literal_true.nt> ; + . + +<#literal_false> rdf:type rdft:TestTurtleEval ; + mf:name "literal_false" ; + rdfs:comment "literal false" ; + mf:action <literal_false.ttl> ; + mf:result <literal_false.nt> ; + . + +<#langtagged_non_LONG> rdf:type rdft:TestTurtleEval ; + mf:name "langtagged_non_LONG" ; + rdfs:comment "langtagged non-LONG \"x\"@en" ; + mf:action <langtagged_non_LONG.ttl> ; + mf:result <langtagged_non_LONG.nt> ; + . + +<#langtagged_LONG> rdf:type rdft:TestTurtleEval ; + mf:name "langtagged_LONG" ; + rdfs:comment "langtagged LONG \"\"\"x\"\"\"@en" ; + mf:action <langtagged_LONG.ttl> ; + mf:result <langtagged_non_LONG.nt> ; + . + +<#lantag_with_subtag> rdf:type rdft:TestTurtleEval ; + mf:name "lantag_with_subtag" ; + rdfs:comment "lantag with subtag \"x\"@en-us" ; + mf:action <lantag_with_subtag.ttl> ; + mf:result <lantag_with_subtag.nt> ; + . + +<#objectList_with_two_objects> rdf:type rdft:TestTurtleEval ; + mf:name "objectList_with_two_objects" ; + rdfs:comment "objectList with two objects … <o1>,<o2>" ; + mf:action <objectList_with_two_objects.ttl> ; + mf:result <objectList_with_two_objects.nt> ; + . + +<#predicateObjectList_with_two_objectLists> rdf:type rdft:TestTurtleEval ; + mf:name "predicateObjectList_with_two_objectLists" ; + rdfs:comment "predicateObjectList with two objectLists … <o1>,<o2>" ; + mf:action <predicateObjectList_with_two_objectLists.ttl> ; + mf:result <predicateObjectList_with_two_objectLists.nt> ; + . + +<#repeated_semis_at_end> rdf:type rdft:TestTurtleEval ; + mf:name "repeated_semis_at_end" ; + rdfs:comment "repeated semis at end <s> <p> <o> ;; <p2> <o2> ." ; + mf:action <repeated_semis_at_end.ttl> ; + mf:result <predicateObjectList_with_two_objectLists.nt> ; + . + +<#repeated_semis_not_at_end> rdf:type rdft:TestTurtleEval ; + mf:name "repeated_semis_not_at_end" ; + rdfs:comment "repeated semis not at end <s> <p> <o> ;;." ; + mf:action <repeated_semis_not_at_end.ttl> ; + mf:result <repeated_semis_not_at_end.nt> ; + . + +# original tests-ttl <#turtle-syntax-file-01> rdf:type rdft:TestTurtlePositiveSyntax ; mf:name "turtle-syntax-file-01" ; rdfs:comment "Empty file" ; @@ -250,42 +847,18 @@ mf:action <turtle-syntax-base-01.ttl> ; . -<#turtle-syntax-base-02> rdf:type rdft:TestTurtlePositiveSyntax ; - mf:name "turtle-syntax-base-02" ; - rdfs:comment "BASE" ; - mf:action <turtle-syntax-base-02.ttl> ; - . - <#turtle-syntax-base-03> rdf:type rdft:TestTurtlePositiveSyntax ; mf:name "turtle-syntax-base-03" ; rdfs:comment "@base with relative IRIs" ; mf:action <turtle-syntax-base-03.ttl> ; . -<#turtle-syntax-base-04> rdf:type rdft:TestTurtlePositiveSyntax ; - mf:name "turtle-syntax-base-04" ; - rdfs:comment "base with relative IRIs" ; - mf:action <turtle-syntax-base-04.ttl> ; - . - <#turtle-syntax-prefix-01> rdf:type rdft:TestTurtlePositiveSyntax ; mf:name "turtle-syntax-prefix-01" ; rdfs:comment "@prefix" ; mf:action <turtle-syntax-prefix-01.ttl> ; . -<#turtle-syntax-prefix-02> rdf:type rdft:TestTurtlePositiveSyntax ; - mf:name "turtle-syntax-prefix-02" ; - rdfs:comment "PreFIX" ; - mf:action <turtle-syntax-prefix-02.ttl> ; - . - -<#turtle-syntax-prefix-03> rdf:type rdft:TestTurtlePositiveSyntax ; - mf:name "turtle-syntax-prefix-03" ; - rdfs:comment "Empty PREFIX" ; - mf:action <turtle-syntax-prefix-03.ttl> ; - . - <#turtle-syntax-prefix-04> rdf:type rdft:TestTurtlePositiveSyntax ; mf:name "turtle-syntax-prefix-04" ; rdfs:comment "Empty @prefix with % escape" ; @@ -1274,3 +1847,105 @@ rdfs:comment "Bad IRI : {abc} (negative evaluation test)" ; mf:action <turtle-eval-bad-04.ttl> ; . + +# tests from Dave Beckett +# http://www.w3.org/2011/rdf-wg/wiki/Turtle_Candidate_Recommendation_Comments#c28 +<#LITERAL_LONG2_with_REVERSE_SOLIDUS> rdf:type rdft:TestTurtleEval ; + mf:name "LITERAL_LONG2_with_REVERSE_SOLIDUS" ; + rdfs:comment "REVERSE SOLIDUS at end of LITERAL_LONG2" ; + mf:action <LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl> ; + mf:result <LITERAL_LONG2_with_REVERSE_SOLIDUS.nt> ; + . + +<#turtle-syntax-bad-LITERAL2_with_langtag_and_datatype> rdf:type rdft:TestTurtleNegativeSyntax ; + mf:name "turtle-syntax-bad-num-05" ; + rdfs:comment "Bad number format (negative test)" ; + mf:action <turtle-syntax-bad-LITERAL2_with_langtag_and_datatype.ttl> ; + . + +<#two_LITERAL_LONG2s> rdf:type rdft:TestTurtleEval ; + mf:name "two_LITERAL_LONG2s" ; + rdfs:comment "two LITERAL_LONG2s testing quote delimiter overrun" ; + mf:action <two_LITERAL_LONG2s.ttl> ; + mf:result <two_LITERAL_LONG2s.nt> ; + . + +# tests from David Robillard +# http://www.w3.org/2011/rdf-wg/wiki/Turtle_Candidate_Recommendation_Comments#c21 +<#turtle-syntax-bad-blank-label-dot-end> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Blank node label must not end in dot" ; + mf:name "turtle-syntax-bad-blank-label-dot-end" ; + mf:action <turtle-syntax-bad-blank-label-dot-end.ttl> . + +<#turtle-syntax-bad-number-dot-in-anon> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Dot delimeter may not appear in anonymous nodes" ; + mf:name "turtle-syntax-bad-number-dot-in-anon" ; + mf:action <turtle-syntax-bad-number-dot-in-anon.ttl> . + +<#turtle-syntax-bad-ln-dash-start> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Local name must not begin with dash" ; + mf:name "turtle-syntax-bad-ln-dash-start" ; + mf:action <turtle-syntax-bad-ln-dash-start.ttl> . + +<#turtle-syntax-bad-ln-escape> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Bad hex escape in local name" ; + mf:name "turtle-syntax-bad-ln-escape" ; + mf:action <turtle-syntax-bad-ln-escape.ttl> . + +<#turtle-syntax-bad-ln-escape-start> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Bad hex escape at start of local name" ; + mf:name "turtle-syntax-bad-ln-escape-start" ; + mf:action <turtle-syntax-bad-ln-escape-start.ttl> . + +<#turtle-syntax-bad-ns-dot-end> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Prefix must not end in dot" ; + mf:name "turtle-syntax-bad-ns-dot-end" ; + mf:action <turtle-syntax-bad-ns-dot-end.ttl> . + +<#turtle-syntax-bad-ns-dot-start> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Prefix must not start with dot" ; + mf:name "turtle-syntax-bad-ns-dot-start" ; + mf:action <turtle-syntax-bad-ns-dot-start.ttl> . + +<#turtle-syntax-bad-missing-ns-dot-end> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Prefix must not end in dot (error in triple, not prefix directive like turtle-syntax-bad-ns-dot-end)" ; + mf:name "turtle-syntax-bad-missing-ns-dot-end" ; + mf:action <turtle-syntax-bad-missing-ns-dot-end.ttl> . + +<#turtle-syntax-bad-missing-ns-dot-start> + rdf:type rdft:TestTurtleNegativeSyntax ; + rdfs:comment "Prefix must not start with dot (error in triple, not prefix directive like turtle-syntax-bad-ns-dot-end)" ; + mf:name "turtle-syntax-bad-missing-ns-dot-start" ; + mf:action <turtle-syntax-bad-missing-ns-dot-start.ttl> . + +<#turtle-syntax-ln-dots> + rdf:type rdft:TestTurtlePositiveSyntax ; + rdfs:comment "Dots in pname local names" ; + mf:name "turtle-syntax-ln-dots" ; + mf:action <turtle-syntax-ln-dots.ttl> . + +<#turtle-syntax-ln-colons> + rdf:type rdft:TestTurtlePositiveSyntax ; + rdfs:comment "Colons in pname local names" ; + mf:name "turtle-syntax-ln-colons" ; + mf:action <turtle-syntax-ln-colons.ttl> . + +<#turtle-syntax-ns-dots> + rdf:type rdft:TestTurtlePositiveSyntax ; + rdfs:comment "Dots in namespace names" ; + mf:name "turtle-syntax-ns-dots" ; + mf:action <turtle-syntax-ns-dots.ttl> . + +<#turtle-syntax-blank-label> + rdf:type rdft:TestTurtlePositiveSyntax ; + rdfs:comment "Characters allowed in blank node labels" ; + mf:name "turtle-syntax-blank-label" ; + mf:action <turtle-syntax-blank-label.ttl> . diff --git a/tests/tests-ttl/turtle-subm-27.ttl b/tests/tests-ttl/turtle-subm-27.ttl index 6721ec24..dc3cfffb 100644 --- a/tests/tests-ttl/turtle-subm-27.ttl +++ b/tests/tests-ttl/turtle-subm-27.ttl @@ -1,4 +1,4 @@ -# In-scope base URI is http://www.w3.org/2001/sw/DataAccess/df1/tests/ at this point +# In-scope base URI is <http://example/base/turtle-subm-27.ttl> at this point <a1> <b1> <c1> . @base <http://example.org/ns/> . # In-scope base URI is http://example.org/ns/ at this point diff --git a/tests/tests-ttl/turtle-syntax-bad-base-03.ttl b/tests/tests-ttl/turtle-syntax-bad-base-03.ttl index b5ef61dd..ebbbc106 100644 --- a/tests/tests-ttl/turtle-syntax-bad-base-03.ttl +++ b/tests/tests-ttl/turtle-syntax-bad-base-03.ttl @@ -1,3 +1,3 @@ -# @base without URI. +# FULL STOP used after SPARQL BASE BASE <http://example/> . <s> <p> <o> . diff --git a/tests/tests-ttl/turtle-syntax-base-02.ttl b/tests/tests-ttl/turtle-syntax-base-02.ttl deleted file mode 100644 index 04f1bfdb..00000000 --- a/tests/tests-ttl/turtle-syntax-base-02.ttl +++ /dev/null @@ -1 +0,0 @@ -BASE <http://example/> diff --git a/tests/tests-ttl/turtle-syntax-base-04.ttl b/tests/tests-ttl/turtle-syntax-base-04.ttl deleted file mode 100644 index f9f136dc..00000000 --- a/tests/tests-ttl/turtle-syntax-base-04.ttl +++ /dev/null @@ -1,2 +0,0 @@ -base <http://example/> -<s> <p> <o> . diff --git a/tests/tests-ttl/turtle-syntax-prefix-02.ttl b/tests/tests-ttl/turtle-syntax-prefix-02.ttl deleted file mode 100644 index 5869e8bd..00000000 --- a/tests/tests-ttl/turtle-syntax-prefix-02.ttl +++ /dev/null @@ -1 +0,0 @@ -PreFIX : <http://example/> diff --git a/tests/tests-ttl/turtle-syntax-prefix-03.ttl b/tests/tests-ttl/turtle-syntax-prefix-03.ttl deleted file mode 100644 index f9c0a3f3..00000000 --- a/tests/tests-ttl/turtle-syntax-prefix-03.ttl +++ /dev/null @@ -1,2 +0,0 @@ -PREFIX : <http://example/> -:s :p :123 . |