Skip to content

Commit 12a81bb

Browse files
gkelloggafs
andauthored
Updates Turtle tests to use triple term syntax and reifications (#135)
* Update Turtle tests for reified triples, triple terms, and other Turtle syntax. * Update to N-Triples tests for reified triples, triple terms, and other Turtle syntax that should not be acceptable as N-Triples. * Negative N-Triples test for reifiedTriple in the predicate position. --------- Co-authored-by: gkellogg <[email protected]> Co-authored-by: Andy Seaborne <[email protected]>
1 parent d5b71d6 commit 12a81bb

File tree

87 files changed

+901
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+901
-415
lines changed

rdf/rdf12/rdf-n-triples/syntax/index.html

Lines changed: 182 additions & 122 deletions
Large diffs are not rendered by default.

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

Lines changed: 90 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -25,123 +25,149 @@ trs:manifest rdf:type mf:Manifest ;
2525
rdfs:seeAlso <README>;
2626
mf:entries
2727
(
28-
trs:ntriples-star-1
29-
trs:ntriples-star-2
30-
trs:ntriples-star-3
28+
trs:ntriples-star-01
29+
trs:ntriples-star-02
30+
trs:ntriples-star-03
3131

3232
trs:ntriples-star-bnode-1
3333

3434
trs:ntriples-star-nested-1
3535

36-
trs:ntriples-base-1
37-
trs:ntriples-base-2
38-
39-
trs:ntriples-star-bad-1
40-
trs:ntriples-star-bad-2
41-
trs:ntriples-star-bad-3
42-
trs:ntriples-star-bad-4
43-
trs:ntriples-star-bad-5
44-
45-
trs:ntriples-star-bad-quoted-1
46-
trs:ntriples-star-bad-quoted-2
47-
trs:ntriples-star-bad-quoted-3
48-
trs:ntriples-star-bad-quoted-4
36+
trs:ntriples-langdir-1
37+
trs:ntriples-langdir-2
38+
39+
trs:ntriples-star-bad-01
40+
trs:ntriples-star-bad-02
41+
trs:ntriples-star-bad-03
42+
trs:ntriples-star-bad-04
43+
trs:ntriples-star-bad-05
44+
trs:ntriples-star-bad-06
45+
trs:ntriples-star-bad-07
46+
trs:ntriples-star-bad-08
47+
trs:ntriples-star-bad-09
48+
trs:ntriples-star-bad-10
49+
50+
trs:ntriples-star-bad-reified-1
51+
trs:ntriples-star-bad-reified-2
52+
trs:ntriples-star-bad-reified-3
53+
trs:ntriples-star-bad-reified-4
4954

5055
trs:ntriples-star-bnode-bad-annotated-syntax-1
5156
trs:ntriples-star-bnode-bad-annotated-syntax-2
52-
trs:ntriples-star-nested-bad-annotated-syntax-1
53-
trs:ntriples-star-nested-bad-annotated-syntax-2
5457

55-
trs:ntriples-base-bad-1
56-
trs:ntriples-base-bad-2
58+
trs:ntriples-langdir-bad-1
59+
trs:ntriples-langdir-bad-2
5760
) .
5861

59-
trs:ntriples-star-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
60-
mf:name "N-Triples-star - triple term" ;
61-
mf:action <ntriples-star-syntax-1.nt> ;
62+
trs:ntriples-star-01 rdf:type rdft:TestNTriplesPositiveSyntax ;
63+
mf:name "N-Triples-star - object triple term" ;
64+
mf:action <ntriples-star-syntax-01.nt> ;
6265
.
6366

64-
trs:ntriples-star-2 rdf:type rdft:TestNTriplesPositiveSyntax ;
65-
mf:name "N-Triples-star - whitespace and terms" ;
66-
mf:action <ntriples-star-syntax-2.nt> ;
67+
trs:ntriples-star-02 rdf:type rdft:TestNTriplesPositiveSyntax ;
68+
mf:name "N-Triples-star - object triple term, no whitespace" ;
69+
mf:action <ntriples-star-syntax-02.nt> ;
6770
.
6871

69-
trs:ntriples-star-3 rdf:type rdft:TestNTriplesPositiveSyntax ;
70-
mf:name "N-Triples-star - Nested, no whitespace" ;
71-
mf:action <ntriples-star-syntax-3.nt> ;
72-
.
72+
trs:ntriples-star-03 rdf:type rdft:TestNTriplesPositiveSyntax ;
73+
mf:name "N-Triples-star - Nested, no whitespace" ;
74+
mf:action <ntriples-star-syntax-03.nt> ;
75+
.
7376

7477
# Blank nodes
7578

7679
trs:ntriples-star-bnode-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
77-
mf:name "N-Triples-star - Blank node object" ;
80+
mf:name "N-Triples-star - Blank node subject" ;
7881
mf:action <ntriples-star-bnode-1.nt> ;
7982
.
8083

81-
# Nesting
82-
8384
trs:ntriples-star-nested-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
84-
mf:name "N-Triples-star - Nested term" ;
85+
mf:name "N-Triples-star - Nested object term" ;
8586
mf:action <ntriples-star-nested-1.nt> ;
8687
.
8788

8889
# Base direction
8990

90-
trs:ntriples-base-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
91+
trs:ntriples-langdir-1 rdf:type rdft:TestNTriplesPositiveSyntax ;
9192
mf:name "N-Triples literal with base direction ltr" ;
92-
mf:action <ntriples-base-1.nt> ;
93+
mf:action <ntriples-langdir-1.nt> ;
9394
.
9495

95-
trs:ntriples-base-2 rdf:type rdft:TestNTriplesPositiveSyntax ;
96+
trs:ntriples-langdir-2 rdf:type rdft:TestNTriplesPositiveSyntax ;
9697
mf:name "N-Triples literal with base direction rtl" ;
97-
mf:action <ntriples-base-2.nt> ;
98+
mf:action <ntriples-langdir-2.nt> ;
9899
.
99100

100101
## Bad syntax
101102

102-
trs:ntriples-star-bad-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
103+
trs:ntriples-star-bad-01 rdf:type rdft:TestNTriplesNegativeSyntax ;
104+
mf:name "N-Triples-star - Bad - reified triple as predicate" ;
105+
mf:action <ntriples-star-bad-syntax-01.nt> ;
106+
.
107+
108+
trs:ntriples-star-bad-02 rdf:type rdft:TestNTriplesNegativeSyntax ;
109+
mf:name "N-Triples-star - Bad - reified triple, literal subject" ;
110+
mf:action <ntriples-star-bad-syntax-02.nt> ;
111+
.
112+
113+
trs:ntriples-star-bad-03 rdf:type rdft:TestNTriplesNegativeSyntax ;
114+
mf:name "N-Triples-star - Bad - reified triple, literal predicate" ;
115+
mf:action <ntriples-star-bad-syntax-03.nt> ;
116+
.
117+
118+
trs:ntriples-star-bad-04 rdf:type rdft:TestNTriplesNegativeSyntax ;
119+
mf:name "N-Triples-star - Bad - reified triple, blank node predicate" ;
120+
mf:action <ntriples-star-bad-syntax-04.nt> ;
121+
.
122+
123+
trs:ntriples-star-bad-05 rdf:type rdft:TestNTriplesNegativeSyntax ;
103124
mf:name "N-Triples-star - Bad - triple term as predicate" ;
104-
mf:action <ntriples-star-bad-syntax-1.nt> ;
125+
mf:action <ntriples-star-bad-syntax-05.nt> ;
105126
.
106127

107-
trs:ntriples-star-bad-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
128+
trs:ntriples-star-bad-06 rdf:type rdft:TestNTriplesNegativeSyntax ;
108129
mf:name "N-Triples-star - Bad - triple term, literal subject" ;
109-
mf:action <ntriples-star-bad-syntax-2.nt> ;
130+
mf:action <ntriples-star-bad-syntax-06.nt> ;
110131
.
111132

112-
trs:ntriples-star-bad-3 rdf:type rdft:TestNTriplesNegativeSyntax ;
133+
trs:ntriples-star-bad-07 rdf:type rdft:TestNTriplesNegativeSyntax ;
113134
mf:name "N-Triples-star - Bad - triple term, literal predicate" ;
114-
mf:action <ntriples-star-bad-syntax-3.nt> ;
135+
mf:action <ntriples-star-bad-syntax-07.nt> ;
115136
.
116137

117-
trs:ntriples-star-bad-4 rdf:type rdft:TestNTriplesNegativeSyntax ;
138+
trs:ntriples-star-bad-08 rdf:type rdft:TestNTriplesNegativeSyntax ;
118139
mf:name "N-Triples-star - Bad - triple term, blank node predicate" ;
119-
mf:action <ntriples-star-bad-syntax-4.nt> ;
140+
mf:action <ntriples-star-bad-syntax-08.nt> ;
141+
.
142+
143+
trs:ntriples-star-bad-09 rdf:type rdft:TestNTriplesNegativeSyntax ;
144+
mf:name "N-Triples-star - Bad - reified triple object" ;
145+
mf:action <ntriples-star-bad-syntax-09.nt> ;
120146
.
121147

122-
trs:ntriples-star-bad-5 rdf:type rdft:TestNTriplesNegativeSyntax ;
148+
trs:ntriples-star-bad-10 rdf:type rdft:TestNTriplesNegativeSyntax ;
123149
mf:name "N-Triples-star - Bad - triple term as subject" ;
124-
mf:action <ntriples-star-bad-syntax-5.nt> ;
150+
mf:action <ntriples-star-bad-syntax-10.nt> ;
125151
.
126152

127-
trs:ntriples-star-bad-quoted-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
128-
mf:name "N-Triples-star - Bad - subject quoted triple" ;
129-
mf:action <ntriples-star-bad-quoted-syntax-1.nt> ;
153+
trs:ntriples-star-bad-reified-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
154+
mf:name "N-Triples-star - Bad - subject reified triple" ;
155+
mf:action <ntriples-star-bad-reified-syntax-1.nt> ;
130156
.
131157

132-
trs:ntriples-star-bad-quoted-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
133-
mf:name "N-Triples-star - Bad - object quoted triple" ;
134-
mf:action <ntriples-star-bad-quoted-syntax-2.nt> ;
158+
trs:ntriples-star-bad-reified-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
159+
mf:name "N-Triples-star - Bad - object reified triple" ;
160+
mf:action <ntriples-star-bad-reified-syntax-2.nt> ;
135161
.
136162

137-
trs:ntriples-star-bad-quoted-3 rdf:type rdft:TestNTriplesNegativeSyntax ;
138-
mf:name "N-Triples-star - Bad - subject and object quoted triples" ;
139-
mf:action <ntriples-star-bad-quoted-syntax-3.nt> ;
163+
trs:ntriples-star-bad-reified-3 rdf:type rdft:TestNTriplesNegativeSyntax ;
164+
mf:name "N-Triples-star - Bad - subject and object reified triples" ;
165+
mf:action <ntriples-star-bad-reified-syntax-3.nt> ;
140166
.
141167

142-
trs:ntriples-star-bad-quoted-4 rdf:type rdft:TestNTriplesNegativeSyntax ;
143-
mf:name "N-Triples-star - Bad - quoted triples whitespace and terms" ;
144-
mf:action <ntriples-star-bad-quoted-syntax-4.nt> ;
168+
trs:ntriples-star-bad-reified-4 rdf:type rdft:TestNTriplesNegativeSyntax ;
169+
mf:name "N-Triples-star - Bad - predicate reified triple" ;
170+
mf:action <ntriples-star-bad-reified-syntax-4.nt> ;
145171
.
146172

147173
# Annotation syntax is not permitted in nt
@@ -156,24 +182,14 @@ trs:ntriples-star-bnode-bad-annotated-syntax-2 rdf:type rdft:TestNTriplesNegativ
156182
mf:action <ntriples-star-bnode-bad-annotated-syntax-2.nt> ;
157183
.
158184

159-
trs:ntriples-star-nested-bad-annotated-syntax-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
160-
mf:name "N-Triples-star - Bad - annotated triple, nested subject term" ;
161-
mf:action <ntriples-star-nested-bad-annotated-syntax-1.nt> ;
162-
.
163-
164-
trs:ntriples-star-nested-bad-annotated-syntax-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
165-
mf:name "N-Triples-star - Bad - annotated triple, nested object term" ;
166-
mf:action <ntriples-star-nested-bad-annotated-syntax-2.nt> ;
167-
.
168-
169185
# Base direction
170186

171-
trs:ntriples-base-bad-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
187+
trs:ntriples-langdir-bad-1 rdf:type rdft:TestNTriplesNegativeSyntax ;
172188
mf:name "N-Triples literal- Bad - undefined base direction" ;
173-
mf:action <ntriples-base-bad-1.nt> ;
189+
mf:action <ntriples-langdir-bad-1.nt> ;
174190
.
175191

176-
trs:ntriples-base-bad-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
192+
trs:ntriples-langdir-bad-2 rdf:type rdft:TestNTriplesNegativeSyntax ;
177193
mf:name "N-Triples literal- Bad - upper case LTR" ;
178-
mf:action <ntriples-base-bad-2.nt> ;
194+
mf:action <ntriples-langdir-bad-2.nt> ;
179195
.

rdf/rdf12/rdf-n-triples/syntax/ntriples-star-bad-quoted-syntax-4.nt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)