Skip to content

Commit 8eab9b2

Browse files
committed
Triple Term canonicalization tests for N-Triples and N-Quads.
For w3c/rdf-n-triples#59.
1 parent dd8adf5 commit 8eab9b2

18 files changed

+80
-0
lines changed

rdf/rdf12/rdf-n-quads/c14n/manifest.ttl

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ PREFIX rdft: <http://www.w3.org/ns/rdftest#>
4646
:literal_with_UTF8_boundaries
4747
:minimal_whitespace-01
4848
:minimal_whitespace-02
49+
:triple-term-01
50+
:triple-term-02
51+
:triple-term-03
52+
:triple-term-04
4953
:nq-syntax-uri-01
5054
:nq-syntax-uri-02
5155
:nq-syntax-uri-03
@@ -239,6 +243,34 @@ PREFIX rdft: <http://www.w3.org/ns/rdftest#>
239243
mf:result <minimal_whitespace-01-c14n.nq>;
240244
.
241245

246+
:triple-term-01 rdf:type rdft:TestNQuadsPositiveC14N ;
247+
mf:name "C14N triple-term-01" ;
248+
rdfs:comment "Tests canonicalization of triple terms with iri subject and object" ;
249+
mf:action <triple-term-01.nq> ;
250+
mf:result <triple-term-01-c14n.nq>;
251+
.
252+
253+
:triple-term-02 rdf:type rdft:TestNQuadsPositiveC14N ;
254+
mf:name "C14N triple-term-02" ;
255+
rdfs:comment "Tests canonicalization of triple terms with iri subject and bnode object" ;
256+
mf:action <triple-term-02.nq> ;
257+
mf:result <triple-term-02-c14n.nq>;
258+
.
259+
260+
:triple-term-03 rdf:type rdft:TestNQuadsPositiveC14N ;
261+
mf:name "C14N triple-term-03" ;
262+
rdfs:comment "Tests canonicalization of triple terms with iri subject and literal object" ;
263+
mf:action <triple-term-03.nq> ;
264+
mf:result <triple-term-03-c14n.nq>;
265+
.
266+
267+
:triple-term-04 rdf:type rdft:TestNQuadsPositiveC14N ;
268+
mf:name "C14N triple-term-03" ;
269+
rdfs:comment "Tests canonicalization of triple terms with triple term object" ;
270+
mf:action <triple-term-04.nq> ;
271+
mf:result <triple-term-04-c14n.nq>;
272+
.
273+
242274
:minimal_whitespace-02 rdf:type rdft:TestNQuadsPositiveC14N ;
243275
mf:name "C14N minimal_whitespace-02" ;
244276
rdfs:comment "Tests canonicalization of quads without optional whitespace" ;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<( <http://example.com/s1> <http://example.com/p1> <http://example.com/o1> )>> <http://example/g> .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<(<http://example.com/s1><http://example.com/p1><http://example.com/o1>)>><http://example/g>.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<( <http://example.com/s1> <http://example.com/p1> _:o1 )>> <http://example/g> .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<(<http://example.com/s1><http://example.com/p1>_:o1)>><http://example/g>.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<( <http://example.com/s1> <http://example.com/p1> "o1" )>> <http://example/g> .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<(<http://example.com/s1><http://example.com/p1>"o1")>><http://example/g>.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<( <http://example.com/s1> <http://example.com/p1> <<( <http://example.com/s2> <http://example.com/p2> "o2" )>> )>> <http://example/g> .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<http://example.com/s> <http://example.com/p> <<(<http://example.com/s1><http://example.com/p1><<(<http://example.com/s2><http://example.com/p2>"o2")>>)>><http://example/g>.

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ PREFIX rdft: <http://www.w3.org/ns/rdftest#>
4646
:literal_with_UTF8_boundaries
4747
:minimal_whitespace-01
4848
:minimal_whitespace-02
49+
:triple-term-01
50+
:triple-term-02
51+
:triple-term-03
52+
:triple-term-04
4953
:nt-syntax-uri-01
5054
:nt-syntax-uri-02
5155
:nt-syntax-uri-03
@@ -279,6 +283,34 @@ PREFIX rdft: <http://www.w3.org/ns/rdftest#>
279283
mf:result <extra_whitespace-04-c14n.nt>;
280284
.
281285

286+
:triple-term-01 rdf:type rdft:TestNTriplesPositiveC14N ;
287+
mf:name "C14N triple-term-01" ;
288+
rdfs:comment "Tests canonicalization of triple terms with iri subject and object" ;
289+
mf:action <triple-term-01.nt> ;
290+
mf:result <triple-term-01-c14n.nt>;
291+
.
292+
293+
:triple-term-02 rdf:type rdft:TestNTriplesPositiveC14N ;
294+
mf:name "C14N triple-term-02" ;
295+
rdfs:comment "Tests canonicalization of triple terms with iri subject and bnode object" ;
296+
mf:action <triple-term-02.nt> ;
297+
mf:result <triple-term-02-c14n.nt>;
298+
.
299+
300+
:triple-term-03 rdf:type rdft:TestNTriplesPositiveC14N ;
301+
mf:name "C14N triple-term-03" ;
302+
rdfs:comment "Tests canonicalization of triple terms with iri subject and literal object" ;
303+
mf:action <triple-term-03.nt> ;
304+
mf:result <triple-term-03-c14n.nt>;
305+
.
306+
307+
:triple-term-04 rdf:type rdft:TestNTriplesPositiveC14N ;
308+
mf:name "C14N triple-term-03" ;
309+
rdfs:comment "Tests canonicalization of triple terms with triple term object" ;
310+
mf:action <triple-term-04.nt> ;
311+
mf:result <triple-term-04-c14n.nt>;
312+
.
313+
282314
:nt-syntax-uri-01 rdf:type rdft:TestNTriplesPositiveC14N ;
283315
mf:name "C14N nt-syntax-uri-01" ;
284316
rdfs:comment "Tests canonicalization of IRIs" ;

0 commit comments

Comments
 (0)