From a27bd15451c9c27c25d3429badfe90cc2b0e9b82 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 4 Mar 2013 04:42:56 +0000 Subject: Support dots and colons in pnames. git-svn-id: http://svn.drobilla.net/serd/trunk@436 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- tests/extra/manifest.ttl | 24 ++++++++++++++++++---- .../extra/turtle-syntax-bad-missing-ns-dot-end.ttl | 2 +- tests/extra/turtle-syntax-ln-colons.nt | 5 +++++ tests/extra/turtle-syntax-ln-colons.ttl | 6 ++++++ tests/extra/turtle-syntax-ln-dots.nt | 3 +++ tests/extra/turtle-syntax-ln-dots.ttl | 4 ++++ 6 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 tests/extra/turtle-syntax-ln-colons.nt create mode 100644 tests/extra/turtle-syntax-ln-colons.ttl create mode 100644 tests/extra/turtle-syntax-ln-dots.nt create mode 100644 tests/extra/turtle-syntax-ln-dots.ttl (limited to 'tests/extra') 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-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-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-ln-dots> + rdf:type rdft:TestTurtlePositiveSyntax ; + rdfs:comment "Dots in pname local names" ; + mf:name "turtle-syntax-ln-dots" ; + mf:action . + +<#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-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 @@ + . + . + . + . + . 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 : . +: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 @@ + . + . + . 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 : . +:s.1 :p.1 :o.1 . +:s..2 :p..2 :o..2. +:3.s :3.p :3. -- cgit v1.2.1