From 45033d91842ebec303589e4ea14e6c62417e8469 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 3 Apr 2023 09:00:29 -0400 Subject: Update TriG test suite This suite can't be exactly copied because it has modifications to support exact streaming tests, but this commit incorporates some upstream changes manually. --- test/w3c/TriGTests/README | 8 ++--- test/w3c/TriGTests/manifest.ttl | 42 ++++++++++++++++-------- test/w3c/TriGTests/trig-syntax-bad-bnode-01.trig | 1 + test/w3c/TriGTests/trig-syntax-bad-bnode-02.trig | 1 + 4 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 test/w3c/TriGTests/trig-syntax-bad-bnode-01.trig create mode 100644 test/w3c/TriGTests/trig-syntax-bad-bnode-02.trig (limited to 'test') diff --git a/test/w3c/TriGTests/README b/test/w3c/TriGTests/README index adbb2a3f..2187549a 100644 --- a/test/w3c/TriGTests/README +++ b/test/w3c/TriGTests/README @@ -2,7 +2,7 @@ This README is for the W3C RDF Working Group's TriG test suite. This test suite contains three kinds of tests: Evaluation (rdft:TestTriGEval) - a pair of an input trig file - and reference ntriples file. + and referenced nquads file. Positive syntax (rdft:TestTriGPositiveSyntax) - an input trig file with no syntax errors. @@ -16,9 +16,9 @@ tests have a name (mf:name) and an input (mf:action). The Evaluation tests have an expected result (mf:result). • An implementation passes an Evaluation test if it parses the input - into a graph, parses the expecte result into another graph, and - those two graphs are isomorphic (see - ). + into a dataset, parses the expected result into another dataset, and + those two dataset are isomorphic (see + ). • An implementation passes a positive syntax test if it parses the input. diff --git a/test/w3c/TriGTests/manifest.ttl b/test/w3c/TriGTests/manifest.ttl index 10a4661f..235ca0d2 100644 --- a/test/w3c/TriGTests/manifest.ttl +++ b/test/w3c/TriGTests/manifest.ttl @@ -15,7 +15,7 @@ @prefix rdft: . <> rdf:type mf:Manifest ; - mf:name "TriG tests" ; + rdfs:label "TriG tests" ; mf:entries ( # TriG specific tests @@ -231,6 +231,8 @@ <#trig-syntax-bad-base-01> <#trig-syntax-bad-base-02> <#trig-syntax-bad-base-03> + <#trig-syntax-bad-bnode-01> + <#trig-syntax-bad-bnode-02> <#trig-syntax-bad-struct-02> <#trig-syntax-bad-struct-03> <#trig-syntax-bad-struct-04> @@ -1839,6 +1841,18 @@ mf:action ; . +<#trig-syntax-bad-bnode-01> rdf:type rdft:TestNTriplesNegativeSyntax ; + mf:name "trig-syntax-bad-bnode-01" ; + rdfs:comment "Colon in bnode label not allowed (negative test)" ; + mf:action ; + . + +<#trig-syntax-bad-bnode-02> rdf:type rdft:TestNTriplesNegativeSyntax ; + mf:name "trig-syntax-bad-bnode-02" ; + rdfs:comment "Colon in bnode label not allowed (negative test)" ; + mf:action ; + . + <#trig-syntax-bad-struct-02> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-struct-02" ; rdfs:comment "Turtle is not N3 (negative test)" ; @@ -1918,91 +1932,91 @@ <#trig-syntax-bad-n3-extras-01> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-01" ; - rdfs:comment "{} fomulae not in Turtle (negative test)" ; + rdfs:comment "{} fomulae not in TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-02> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-02" ; - rdfs:comment "= is not Turtle (negative test)" ; + rdfs:comment "= is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-03> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-03" ; - rdfs:comment "N3 paths not in Turtle (negative test)" ; + rdfs:comment "N3 paths not in TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-04> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-04" ; - rdfs:comment "N3 paths not in Turtle (negative test)" ; + rdfs:comment "N3 paths not in TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-05> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-05" ; - rdfs:comment "N3 is...of not in Turtle (negative test)" ; + rdfs:comment "N3 is...of not in TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-06> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-06" ; - rdfs:comment "N3 paths not in Turtle (negative test)" ; + rdfs:comment "N3 paths not in TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-07> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-07" ; - rdfs:comment "@keywords is not Turtle (negative test)" ; + rdfs:comment "@keywords is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-08> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-08" ; - rdfs:comment "@keywords is not Turtle (negative test)" ; + rdfs:comment "@keywords is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-09> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-09" ; - rdfs:comment "=> is not Turtle (negative test)" ; + rdfs:comment "=> is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-10> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-10" ; - rdfs:comment "<= is not Turtle (negative test)" ; + rdfs:comment "<= is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-11> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-11" ; - rdfs:comment "@forSome is not Turtle (negative test)" ; + rdfs:comment "@forSome is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-12> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-12" ; - rdfs:comment "@forAll is not Turtle (negative test)" ; + rdfs:comment "@forAll is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . <#trig-syntax-bad-n3-extras-13> rdf:type rdft:TestTrigNegativeSyntax ; mf:name "trig-syntax-bad-n3-extras-13" ; - rdfs:comment "@keywords is not Turtle (negative test)" ; + rdfs:comment "@keywords is not TriG (negative test)" ; rdft:approval rdft:Approved ; mf:action ; . diff --git a/test/w3c/TriGTests/trig-syntax-bad-bnode-01.trig b/test/w3c/TriGTests/trig-syntax-bad-bnode-01.trig new file mode 100644 index 00000000..a776d20d --- /dev/null +++ b/test/w3c/TriGTests/trig-syntax-bad-bnode-01.trig @@ -0,0 +1 @@ +_::a . diff --git a/test/w3c/TriGTests/trig-syntax-bad-bnode-02.trig b/test/w3c/TriGTests/trig-syntax-bad-bnode-02.trig new file mode 100644 index 00000000..093b8700 --- /dev/null +++ b/test/w3c/TriGTests/trig-syntax-bad-bnode-02.trig @@ -0,0 +1 @@ +_:abc:def . -- cgit v1.2.1