Skip to content

Commit

Permalink
feat: add negative tests for annotation syntax in nt (#280)
Browse files Browse the repository at this point in the history
* feat: add negative tests for annotation syntax in nt
* feat: update manifests
  • Loading branch information
jeswr committed Jun 29, 2023
1 parent a7d7db1 commit 59eb029
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/nt/syntax/manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,30 @@
"@type": "rdft:TestNTriplesNegativeSyntax",
"action": "ntriples-star-bad-syntax-4.nt",
"name": "N-Triples-star - Bad - quoted triple, blank node predicate"
},
{
"@id": "trs:ntriples-star-bnode-bad-annotated-syntax-1",
"@type": "rdft:TestNTriplesNegativeSyntax",
"action": "ntriples-star-bnode-bad-annotated-syntax-1.nt",
"name": "N-Triples-star - Bad - annotated triple, blank node subject"
},
{
"@id": "trs:ntriples-star-bnode-bad-annotated-syntax-2",
"@type": "rdft:TestNTriplesNegativeSyntax",
"action": "ntriples-star-bnode-bad-annotated-syntax-2.nt",
"name": "N-Triples-star - Bad - annotated triple, blank node object"
},
{
"@id": "trs:ntriples-star-nested-bad-annotated-syntax-1",
"@type": "rdft:TestNTriplesNegativeSyntax",
"action": "ntriples-star-nested-bad-annotated-syntax-1.nt",
"name": "N-Triples-star - Bad - annotated triple, nested subject term"
},
{
"@id": "trs:ntriples-star-nested-bad-annotated-syntax-2",
"@type": "rdft:TestNTriplesNegativeSyntax",
"action": "ntriples-star-nested-bad-annotated-syntax-2.nt",
"name": "N-Triples-star - Bad - annotated triple, nested object term"
}
],
"prefLabel": {
Expand Down
27 changes: 27 additions & 0 deletions tests/nt/syntax/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ trs:manifest rdf:type mf:Manifest ;
trs:ntriples-star-bad-2
trs:ntriples-star-bad-3
trs:ntriples-star-bad-4

trs:ntriples-star-bnode-bad-annotated-syntax-1
trs:ntriples-star-bnode-bad-annotated-syntax-2
trs:ntriples-star-nested-bad-annotated-syntax-1
trs:ntriples-star-nested-bad-annotated-syntax-2
) .

trs:ntriples-star-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
Expand Down Expand Up @@ -110,3 +115,25 @@ trs:ntriples-star-bad-4 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - quoted triple, blank node predicate" ;
mf:action <ntriples-star-bad-syntax-4.nt> ;
.

# Annotation syntax is not permitted in nt

trs:ntriples-star-bnode-bad-annotated-syntax-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - annotated triple, blank node subject" ;
mf:action <ntriples-star-bnode-bad-annotated-syntax-1.nt> ;
.

trs:ntriples-star-bnode-bad-annotated-syntax-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - annotated triple, blank node object" ;
mf:action <ntriples-star-bnode-bad-annotated-syntax-2.nt> ;
.

trs:ntriples-star-nested-bad-annotated-syntax-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - annotated triple, nested subject term" ;
mf:action <ntriples-star-nested-bad-annotated-syntax-1.nt> ;
.

trs:ntriples-star-nested-bad-annotated-syntax-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
mf:name "N-Triples-star - Bad - annotated triple, nested object term" ;
mf:action <ntriples-star-nested-bad-annotated-syntax-2.nt> ;
.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_:b0 <http://example/p> <http://example/o> {| <http://example/q> "ABC" |} .
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<http://example/s> <http://example/p> _:b1 {| <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> |} .
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<http://example/s> <http://example/p> <http://example/o> {| <http://example/r> <http://example/z> {| <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> |} |} .
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<http://example/s> <http://example/p> <http://example/o> .
<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> {| <http://example/r> <http://example/z> |} .

0 comments on commit 59eb029

Please sign in to comment.