Skip to content

Commit 892ea80

Browse files
committed
Added negative syntax tests for bad IRIs and language tags.
Updated README to indicate conditions for signalling errors or warnings.
1 parent 8c3f37e commit 892ea80

File tree

6 files changed

+31
-2
lines changed

6 files changed

+31
-2
lines changed

rdf/rdf12/rdf-n-triples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ The `manifest.ttl` files in this directory lists tests in the RDF-star WG's N-Tr
99
All tests have a name (`mf:name`) and an input (`mf:action`).
1010

1111
* An implementation passes a positive syntax test if it parses the
12-
input.
12+
input, and signals no errors or warnings.
1313
* An implementation passes a negative syntax test if it fails to parse
14-
the input.
14+
the input, or signals an error or warning.
1515
* An implementation passes a positive canonicalization test if it parses the
1616
input, and generates the expected result (`mf:result`) compared as text when generating the canonical form of triples.
1717

rdf/rdf12/rdf-n-triples/syntax/manifest.ttl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ trs:manifest rdf:type mf:Manifest ;
4747
trs:ntriples12-bad-09
4848
trs:ntriples12-bad-10
4949

50+
trs:ntriples12-bad-iri-1
51+
5052
trs:ntriples12-bad-reified-1
5153
trs:ntriples12-bad-reified-2
5254
trs:ntriples12-bad-reified-3
@@ -57,6 +59,9 @@ trs:manifest rdf:type mf:Manifest ;
5759

5860
trs:ntriples-langdir-bad-1
5961
trs:ntriples-langdir-bad-2
62+
trs:ntriples-langdir-bad-3
63+
trs:ntriples-langdir-bad-4
64+
trs:ntriples-langdir-bad-5
6065
) .
6166

6267
trs:ntriples12-01 rdf:type rdft:TestNTriplesPositiveSyntax ;
@@ -150,6 +155,11 @@ trs:ntriples12-bad-10 rdf:type rdft:TestNTriplesNegativeSyntax ;
150155
mf:action <ntriples12-bad-syntax-10.nt> ;
151156
.
152157

158+
trs:ntriples12-bad-iri-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
159+
mf:name "N-Triples - Bad - invalid IRI" ;
160+
mf:action <ntriples12-bad-iri-1.nt> ;
161+
.
162+
153163
trs:ntriples12-bad-reified-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
154164
mf:name "N-Triples-12 - Bad - subject reified triple" ;
155165
mf:action <ntriples12-bad-reified-syntax-1.nt> ;
@@ -193,3 +203,18 @@ trs:ntriples-langdir-bad-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
193203
mf:name "N-Triples literal- Bad - upper case LTR" ;
194204
mf:action <ntriples-langdir-bad-2.nt> ;
195205
.
206+
207+
trs:ntriples-langdir-bad-3 rdf:type rdft:TestNTriplesNegativeSyntax ;
208+
mf:name "N-Triples - Bad - literal with missing language tag" ;
209+
mf:action <ntriples-langdir-bad-3.nt> ;
210+
.
211+
212+
trs:ntriples-langdir-bad-4 rdf:type rdft:TestNTriplesNegativeSyntax ;
213+
mf:name "N-Triples - Bad - literal with bad language tag" ;
214+
mf:action <ntriples-langdir-bad-4.nt> ;
215+
.
216+
217+
trs:ntriples-langdir-bad-5 rdf:type rdft:TestNTriplesNegativeSyntax ;
218+
mf:name "N-Triples - Bad - literal with missing language tag and direction" ;
219+
mf:action <ntriples-langdir-bad-5.nt> ;
220+
.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example/a> <http://example/b> "Hello"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString> .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example/a> <http://example/b> "Hello"@cantbethislong .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example/a> <http://example/b> "Hello"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#dirLangString> .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example/a> <http://example/b> <//example/missing-scheme> .

0 commit comments

Comments
 (0)