aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/extra/manifest.ttl86
-rw-r--r--tests/extra/turtle-syntax-bad-blank-label-dot-end.ttl2
-rw-r--r--tests/extra/turtle-syntax-bad-ln-dash-start.ttl2
-rw-r--r--tests/extra/turtle-syntax-bad-ln-escape-start.ttl2
-rw-r--r--tests/extra/turtle-syntax-bad-ln-escape.ttl2
-rw-r--r--tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl1
-rw-r--r--tests/extra/turtle-syntax-bad-missing-ns-dot-start.ttl1
-rw-r--r--tests/extra/turtle-syntax-bad-ns-dot-end.ttl2
-rw-r--r--tests/extra/turtle-syntax-bad-ns-dot-start.ttl2
-rw-r--r--tests/extra/turtle-syntax-bad-number-dot-in-anon.ttl6
-rw-r--r--tests/extra/turtle-syntax-blank-label.nt3
-rw-r--r--tests/extra/turtle-syntax-blank-label.ttl4
-rw-r--r--tests/extra/turtle-syntax-ns-dots.ttl2
-rw-r--r--tests/extra/turtle-syntax-pname-dots.ttl2
14 files changed, 117 insertions, 0 deletions
diff --git a/tests/extra/manifest.ttl b/tests/extra/manifest.ttl
new file mode 100644
index 00000000..f373f3a2
--- /dev/null
+++ b/tests/extra/manifest.ttl
@@ -0,0 +1,86 @@
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rdft: <http://www.w3.org/ns/rdftest#> .
+
+<>
+ rdf:type mf:Manifest ;
+ rdfs:comment "Extra Turtle tests from Serd" ;
+ mf:entries (
+ <#turtle-syntax-bad-blank-label-dot-end>
+ <#turtle-syntax-bad-ln-dash-start>
+ <#turtle-syntax-bad-ln-escape>
+ <#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-blank-label>
+ <#turtle-syntax-ns-dots>
+ ) .
+
+<#turtle-syntax-bad-blank-label-dot-end>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ rdfs:comment "Blank node label must not end in dot" ;
+ mf:name "turtle-syntax-bad-blank-label-dot-end" ;
+ mf:action <turtle-syntax-bad-blank-label-dot-end.ttl> .
+
+<#turtle-syntax-bad-number-dot-in-anon>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ rdfs:comment "Dot delimeter may not appear in anonymous nodes" ;
+ mf:name "turtle-syntax-bad-number-dot-in-anon" ;
+ mf:action <turtle-syntax-bad-number-dot-in-anon.ttl> .
+
+<#turtle-syntax-bad-ln-dash-start>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ rdfs:comment "Local name must not begin with dash" ;
+ mf:name "turtle-syntax-bad-ln-dash-start" ;
+ mf:action <turtle-syntax-bad-ln-dash-start.ttl> .
+
+<#turtle-syntax-bad-ln-escape>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ rdfs:comment "Bad hex escape in local name" ;
+ mf:name "turtle-syntax-bad-ln-escape" ;
+ mf:action <turtle-syntax-bad-ln-escape.ttl> .
+
+<#turtle-syntax-bad-ln-escape-start>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ rdfs:comment "Bad hex escape at start of local name" ;
+ mf:name "turtle-syntax-bad-ln-escape-start" ;
+ mf:action <turtle-syntax-bad-ln-escape-start.ttl> .
+
+<#turtle-syntax-bad-ns-dot-end>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ rdfs:comment "Prefix must not end in dot" ;
+ mf:name "turtle-syntax-bad-ns-dot-end" ;
+ mf:action <turtle-syntax-bad-ns-dot-end.ttl> .
+
+<#turtle-syntax-bad-ns-dot-start>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ rdfs:comment "Prefix must not start with dot" ;
+ mf:name "turtle-syntax-bad-ns-dot-start" ;
+ mf:action <turtle-syntax-bad-ns-dot-start.ttl> .
+
+<#turtle-syntax-bad-ns-missing-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>
+ 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-ns-dots>
+ rdf:type rdft:TestTurtlePositiveSyntax ;
+ rdfs:comment "Dots in namespace names" ;
+ mf:name "turtle-syntax-ns-dots" ;
+ mf:action <turtle-syntax-ns-dots.ttl> .
+
+<#turtle-syntax-blank-label>
+ rdf:type rdft:TestTurtlePositiveSyntax ;
+ rdfs:comment "Characters allowed in blank node labels" ;
+ mf:name "turtle-syntax-blank-label" ;
+ mf:action <turtle-syntax-blank-label.ttl> .
diff --git a/tests/extra/turtle-syntax-bad-blank-label-dot-end.ttl b/tests/extra/turtle-syntax-bad-blank-label-dot-end.ttl
new file mode 100644
index 00000000..613e775f
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-blank-label-dot-end.ttl
@@ -0,0 +1,2 @@
+@prefix : <http://example/> .
+_:b1. :p :o .
diff --git a/tests/extra/turtle-syntax-bad-ln-dash-start.ttl b/tests/extra/turtle-syntax-bad-ln-dash-start.ttl
new file mode 100644
index 00000000..291bdda3
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-ln-dash-start.ttl
@@ -0,0 +1,2 @@
+@prefix : <http://example/> .
+:s :p :-o .
diff --git a/tests/extra/turtle-syntax-bad-ln-escape-start.ttl b/tests/extra/turtle-syntax-bad-ln-escape-start.ttl
new file mode 100644
index 00000000..d1661bd7
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-ln-escape-start.ttl
@@ -0,0 +1,2 @@
+@prefix : <http://example/> .
+:s :p :%2o .
diff --git a/tests/extra/turtle-syntax-bad-ln-escape.ttl b/tests/extra/turtle-syntax-bad-ln-escape.ttl
new file mode 100644
index 00000000..585e28b5
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-ln-escape.ttl
@@ -0,0 +1,2 @@
+@prefix : <http://example/> .
+:s :p :o%2 .
diff --git a/tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl b/tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl
new file mode 100644
index 00000000..4a593eb7
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-missing-ns-dot-end.ttl
@@ -0,0 +1 @@
+undefined.:s undefined.:p undefined.:o .
diff --git a/tests/extra/turtle-syntax-bad-missing-ns-dot-start.ttl b/tests/extra/turtle-syntax-bad-missing-ns-dot-start.ttl
new file mode 100644
index 00000000..23514bcc
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-missing-ns-dot-start.ttl
@@ -0,0 +1 @@
+.undefined:s .undefined:p .undefined:o .
diff --git a/tests/extra/turtle-syntax-bad-ns-dot-end.ttl b/tests/extra/turtle-syntax-bad-ns-dot-end.ttl
new file mode 100644
index 00000000..a99fc98d
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-ns-dot-end.ttl
@@ -0,0 +1,2 @@
+@prefix eg. : <http://example/> .
+eg.:s eg.:p eg.:o .
diff --git a/tests/extra/turtle-syntax-bad-ns-dot-start.ttl b/tests/extra/turtle-syntax-bad-ns-dot-start.ttl
new file mode 100644
index 00000000..b3993dd7
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-ns-dot-start.ttl
@@ -0,0 +1,2 @@
+@prefix .eg : <http://example/> .
+.eg:s .eg:p .eg:o .
diff --git a/tests/extra/turtle-syntax-bad-number-dot-in-anon.ttl b/tests/extra/turtle-syntax-bad-number-dot-in-anon.ttl
new file mode 100644
index 00000000..46d15f9a
--- /dev/null
+++ b/tests/extra/turtle-syntax-bad-number-dot-in-anon.ttl
@@ -0,0 +1,6 @@
+@prefix : <http://example/> .
+
+:s
+ :p [
+ :p1 27.
+ ] .
diff --git a/tests/extra/turtle-syntax-blank-label.nt b/tests/extra/turtle-syntax-blank-label.nt
new file mode 100644
index 00000000..05dcc396
--- /dev/null
+++ b/tests/extra/turtle-syntax-blank-label.nt
@@ -0,0 +1,3 @@
+_:0b <http://example/p> <http://example/o> .
+_:_b <http://example/p> <http://example/o> .
+_:b.0 <http://example/p> <http://example/o> .
diff --git a/tests/extra/turtle-syntax-blank-label.ttl b/tests/extra/turtle-syntax-blank-label.ttl
new file mode 100644
index 00000000..3e3e516d
--- /dev/null
+++ b/tests/extra/turtle-syntax-blank-label.ttl
@@ -0,0 +1,4 @@
+@prefix : <http://example/> .
+_:0b :p :o . # Starts with digit
+_:_b :p :o . # Starts with underscore
+_:b.0 :p :o . # Contains dot, ends with digit
diff --git a/tests/extra/turtle-syntax-ns-dots.ttl b/tests/extra/turtle-syntax-ns-dots.ttl
new file mode 100644
index 00000000..78465870
--- /dev/null
+++ b/tests/extra/turtle-syntax-ns-dots.ttl
@@ -0,0 +1,2 @@
+@prefix e.g: <http://example/> .
+e.g:s e.g:p e.g:o .
diff --git a/tests/extra/turtle-syntax-pname-dots.ttl b/tests/extra/turtle-syntax-pname-dots.ttl
new file mode 100644
index 00000000..a708cf70
--- /dev/null
+++ b/tests/extra/turtle-syntax-pname-dots.ttl
@@ -0,0 +1,2 @@
+@prefix : <http://example/> .
+:s.ubj :p.r.ed :o.bject.