aboutsummaryrefslogtreecommitdiffstats
path: root/test/extra/lax
diff options
context:
space:
mode:
Diffstat (limited to 'test/extra/lax')
-rw-r--r--test/extra/lax/README.md5
-rw-r--r--test/extra/lax/manifest.ttl30
-rw-r--r--test/extra/lax/test-bad-string.nt1
-rw-r--r--test/extra/lax/test-bad-string.ttl3
-rw-r--r--test/extra/lax/test-bad-uri.nt4
-rw-r--r--test/extra/lax/test-bad-uri.ttl4
-rw-r--r--test/extra/lax/test-bad-utf8.nt6
-rw-r--r--test/extra/lax/test-bad-utf8.ttl6
8 files changed, 59 insertions, 0 deletions
diff --git a/test/extra/lax/README.md b/test/extra/lax/README.md
new file mode 100644
index 00000000..d1b5d375
--- /dev/null
+++ b/test/extra/lax/README.md
@@ -0,0 +1,5 @@
+Lax Test Suite
+==============
+
+This suite contains negative tests that can be successfully read (with
+warnings) if and only if lax parsing is enabled.
diff --git a/test/extra/lax/manifest.ttl b/test/extra/lax/manifest.ttl
new file mode 100644
index 00000000..5d220daf
--- /dev/null
+++ b/test/extra/lax/manifest.ttl
@@ -0,0 +1,30 @@
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rdft: <http://www.w3.org/ns/rdftest#> .
+
+<>
+ a mf:Manifest ;
+ rdfs:comment "Serd lax syntax test cases" ;
+ mf:entries (
+ <#test-bad-string>
+ <#test-bad-uri>
+ <#test-bad-utf8>
+ ) .
+
+<#test-bad-string>
+ a rdft:TestTurtleNegativeSyntax ;
+ mf:action <test-bad-string.ttl> ;
+ mf:name "test-bad-string" ;
+ mf:result <test-bad-string.nt> .
+
+<#test-bad-uri>
+ a rdft:TestTurtleNegativeSyntax ;
+ mf:action <test-bad-uri.ttl> ;
+ mf:name "test-bad-uri" ;
+ mf:result <test-bad-uri.nt> .
+
+<#test-bad-utf8>
+ a rdft:TestTurtleNegativeSyntax ;
+ mf:action <test-bad-utf8.ttl> ;
+ mf:name "test-bad-utf8" ;
+ mf:result <test-bad-utf8.nt> .
diff --git a/test/extra/lax/test-bad-string.nt b/test/extra/lax/test-bad-string.nt
new file mode 100644
index 00000000..24f80a2e
--- /dev/null
+++ b/test/extra/lax/test-bad-string.nt
@@ -0,0 +1 @@
+<http://example.org/s1> <http://example.org/p2> "Good" .
diff --git a/test/extra/lax/test-bad-string.ttl b/test/extra/lax/test-bad-string.ttl
new file mode 100644
index 00000000..72eb9621
--- /dev/null
+++ b/test/extra/lax/test-bad-string.ttl
@@ -0,0 +1,3 @@
+<http://example.org/s1> <http://example.org/p1> "Truncated line
+<http://example.org/s1> <http://example.org/p1> "Bad escape \? " .
+<http://example.org/s1> <http://example.org/p2> "Good" .
diff --git a/test/extra/lax/test-bad-uri.nt b/test/extra/lax/test-bad-uri.nt
new file mode 100644
index 00000000..8cb00ba7
--- /dev/null
+++ b/test/extra/lax/test-bad-uri.nt
@@ -0,0 +1,4 @@
+<http://example.org/s> <http://example.org/p> <http://example.org/\u0009bado1> .
+<http://example.org/s> <http://example.org/p> <http://example.org/goodo1> .
+<http://example.org/s> <http://example.org/p> <http://example.org/\uFFFDbado2> .
+<http://example.org/s> <http://example.org/p> <http://example.org/goodo2> .
diff --git a/test/extra/lax/test-bad-uri.ttl b/test/extra/lax/test-bad-uri.ttl
new file mode 100644
index 00000000..8f11b1d7
--- /dev/null
+++ b/test/extra/lax/test-bad-uri.ttl
@@ -0,0 +1,4 @@
+<http://example.org/s> <http://example.org/p> <http://example.org/ bado1> .
+<http://example.org/s> <http://example.org/p> <http://example.org/goodo1> .
+<http://example.org/s> <http://example.org/p> <http://example.org/ÿÿbado2> .
+<http://example.org/s> <http://example.org/p> <http://example.org/goodo2> .
diff --git a/test/extra/lax/test-bad-utf8.nt b/test/extra/lax/test-bad-utf8.nt
new file mode 100644
index 00000000..58f2c52b
--- /dev/null
+++ b/test/extra/lax/test-bad-utf8.nt
@@ -0,0 +1,6 @@
+<http://example.org/s> <http://example.org/p> "Impossible bytes: \uFFFD \uFFFD" .
+<http://example.org/s> <http://example.org/p> "2 continuation bytes: \uFFFD" .
+<http://example.org/s> <http://example.org/p> "Missing continuation: \uFFFD" .
+<http://example.org/s> <http://example.org/p> "Impossible bytes: \uFFFD \uFFFD" .
+<http://example.org/s> <http://example.org/p> "2 continuation bytes: \uFFFD" .
+<http://example.org/s> <http://example.org/p> "Missing continuation: \uFFFD" .
diff --git a/test/extra/lax/test-bad-utf8.ttl b/test/extra/lax/test-bad-utf8.ttl
new file mode 100644
index 00000000..0e177366
--- /dev/null
+++ b/test/extra/lax/test-bad-utf8.ttl
@@ -0,0 +1,6 @@
+<http://example.org/s> <http://example.org/p> "Impossible bytes: þ ÿ" .
+<http://example.org/s> <http://example.org/p> "2 continuation bytes: €¿" .
+<http://example.org/s> <http://example.org/p> "Missing continuation: À" .
+<http://example.org/s> <http://example.org/p> """Impossible bytes: þ ÿ""" .
+<http://example.org/s> <http://example.org/p> """2 continuation bytes: €¿""" .
+<http://example.org/s> <http://example.org/p> """Missing continuation: À""" .