aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-03-04 04:42:56 +0000
committerDavid Robillard <d@drobilla.net>2013-03-04 04:42:56 +0000
commita27bd15451c9c27c25d3429badfe90cc2b0e9b82 (patch)
treecbd245a816ded86b5fb9058f696fabcfcbbb0961 /tests
parent3a4d1a415691e45ffef6f64c32c0301fef577458 (diff)
downloadserd-a27bd15451c9c27c25d3429badfe90cc2b0e9b82.tar.gz
serd-a27bd15451c9c27c25d3429badfe90cc2b0e9b82.tar.bz2
serd-a27bd15451c9c27c25d3429badfe90cc2b0e9b82.zip
Support dots and colons in pnames.
git-svn-id: http://svn.drobilla.net/serd/trunk@436 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'tests')
-rw-r--r--tests/bad/bad-subject.ttl1
-rw-r--r--tests/extra/manifest.ttl24
-rw-r--r--tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl2
-rw-r--r--tests/extra/turtle-syntax-ln-colons.nt5
-rw-r--r--tests/extra/turtle-syntax-ln-colons.ttl6
-rw-r--r--tests/extra/turtle-syntax-ln-dots.nt3
-rw-r--r--tests/extra/turtle-syntax-ln-dots.ttl4
7 files changed, 40 insertions, 5 deletions
diff --git a/tests/bad/bad-subject.ttl b/tests/bad/bad-subject.ttl
new file mode 100644
index 00000000..b98ea39b
--- /dev/null
+++ b/tests/bad/bad-subject.ttl
@@ -0,0 +1 @@
+invalid.:thing a invalid.Thing .
diff --git a/tests/extra/manifest.ttl b/tests/extra/manifest.ttl
index f373f3a2..49e7436d 100644
--- a/tests/extra/manifest.ttl
+++ b/tests/extra/manifest.ttl
@@ -10,12 +10,16 @@
mf:entries (
<#turtle-syntax-bad-blank-label-dot-end>
<#turtle-syntax-bad-ln-dash-start>
+ <#turtle-syntax-bad-ln-escape-start>
<#turtle-syntax-bad-ln-escape>
+ <#turtle-syntax-bad-missing-ns-dot-end>
+ <#turtle-syntax-bad-missing-ns-dot-start>
<#turtle-syntax-bad-ns-dot-end>
<#turtle-syntax-bad-ns-dot-start>
- <#turtle-syntax-bad-ns-missing-dot-end>
- <#turtle-syntax-bad-ns-missing-dot-start>
+ <#turtle-syntax-bad-number-dot-in-anon>
<#turtle-syntax-blank-label>
+ <#turtle-syntax-ln-colons>
+ <#turtle-syntax-ln-dots>
<#turtle-syntax-ns-dots>
) .
@@ -61,18 +65,30 @@
mf:name "turtle-syntax-bad-ns-dot-start" ;
mf:action <turtle-syntax-bad-ns-dot-start.ttl> .
-<#turtle-syntax-bad-ns-missing-dot-end>
+<#turtle-syntax-bad-missing-ns-dot-end>
rdf:type rdft:TestTurtleNegativeSyntax ;
rdfs:comment "Prefix must not end in dot (error in triple, not prefix directive like turtle-syntax-bad-ns-dot-end)" ;
mf:name "turtle-syntax-bad-missing-ns-dot-end" ;
mf:action <turtle-syntax-bad-missing-ns-dot-end.ttl> .
-<#turtle-syntax-bad-ns-missing-dot-start>
+<#turtle-syntax-bad-missing-ns-dot-start>
rdf:type rdft:TestTurtleNegativeSyntax ;
rdfs:comment "Prefix must not start with dot (error in triple, not prefix directive like turtle-syntax-bad-ns-dot-end)" ;
mf:name "turtle-syntax-bad-missing-ns-dot-start" ;
mf:action <turtle-syntax-bad-missing-ns-dot-start.ttl> .
+<#turtle-syntax-ln-dots>
+ rdf:type rdft:TestTurtlePositiveSyntax ;
+ rdfs:comment "Dots in pname local names" ;
+ mf:name "turtle-syntax-ln-dots" ;
+ mf:action <turtle-syntax-ln-dots.ttl> .
+
+<#turtle-syntax-ln-colons>
+ rdf:type rdft:TestTurtlePositiveSyntax ;
+ rdfs:comment "Colons in pname local names" ;
+ mf:name "turtle-syntax-ln-colons" ;
+ mf:action <turtle-syntax-ln-colons.ttl> .
+
<#turtle-syntax-ns-dots>
rdf:type rdft:TestTurtlePositiveSyntax ;
rdfs:comment "Dots in namespace names" ;
diff --git a/tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl b/tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl
index 4a593eb7..d06f4e69 100644
--- a/tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl
+++ b/tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl
@@ -1 +1 @@
-undefined.:s undefined.:p undefined.:o .
+valid:s valid:p invalid.:o .
diff --git a/tests/extra/turtle-syntax-ln-colons.nt b/tests/extra/turtle-syntax-ln-colons.nt
new file mode 100644
index 00000000..9b3c223f
--- /dev/null
+++ b/tests/extra/turtle-syntax-ln-colons.nt
@@ -0,0 +1,5 @@
+<http://example/s:1> <http://example/p:1> <http://example/o:1> .
+<http://example/s::2> <http://example/p::2> <http://example/o::2> .
+<http://example/3:s> <http://example/3:p> <http://example/3> .
+<http://example/:s> <http://example/:p> <http://example/:o> .
+<http://example/:s:> <http://example/:p:> <http://example/:o:> .
diff --git a/tests/extra/turtle-syntax-ln-colons.ttl b/tests/extra/turtle-syntax-ln-colons.ttl
new file mode 100644
index 00000000..397989db
--- /dev/null
+++ b/tests/extra/turtle-syntax-ln-colons.ttl
@@ -0,0 +1,6 @@
+@prefix : <http://example/> .
+:s:1 :p:1 :o:1 .
+:s::2 :p::2 :o::2 .
+:3:s :3:p :3 .
+::s ::p ::o .
+::s: ::p: ::o: .
diff --git a/tests/extra/turtle-syntax-ln-dots.nt b/tests/extra/turtle-syntax-ln-dots.nt
new file mode 100644
index 00000000..d24052bb
--- /dev/null
+++ b/tests/extra/turtle-syntax-ln-dots.nt
@@ -0,0 +1,3 @@
+<http://example/s.1> <http://example/p.1> <http://example/o.1> .
+<http://example/s..2> <http://example/p..2> <http://example/o..2> .
+<http://example/3.s> <http://example/3.p> <http://example/3> .
diff --git a/tests/extra/turtle-syntax-ln-dots.ttl b/tests/extra/turtle-syntax-ln-dots.ttl
new file mode 100644
index 00000000..230381a1
--- /dev/null
+++ b/tests/extra/turtle-syntax-ln-dots.ttl
@@ -0,0 +1,4 @@
+@prefix : <http://example/> .
+:s.1 :p.1 :o.1 .
+:s..2 :p..2 :o..2.
+:3.s :3.p :3.