aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lax
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-11-25 16:12:23 +0100
committerDavid Robillard <d@drobilla.net>2019-04-13 19:48:23 +0200
commit3b1252125ca66387f904ce107fb4c6130d5c582d (patch)
tree2407cdb6f3c372286895e767c58153f6f02bbe5b /tests/lax
parente320bb53e58314fb2f04d514fc68202efcb52f3e (diff)
downloadserd-3b1252125ca66387f904ce107fb4c6130d5c582d.tar.gz
serd-3b1252125ca66387f904ce107fb4c6130d5c582d.tar.bz2
serd-3b1252125ca66387f904ce107fb4c6130d5c582d.zip
Add separate test suite for lax syntax tests
Diffstat (limited to 'tests/lax')
-rw-r--r--tests/lax/manifest.ttl17
-rw-r--r--tests/lax/test-bad-utf8.nt3
-rw-r--r--tests/lax/test-bad-utf8.ttl3
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/lax/manifest.ttl b/tests/lax/manifest.ttl
new file mode 100644
index 00000000..4de689ad
--- /dev/null
+++ b/tests/lax/manifest.ttl
@@ -0,0 +1,17 @@
+@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
+@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 "Serd lax syntax test cases" ;
+ mf:entries (
+ <#test-bad-utf8>
+ ) .
+
+<#test-bad-utf8>
+ rdf:type rdft:TestTurtleNegativeSyntax ;
+ mf:name "test-bad-utf8" ;
+ mf:action <test-bad-utf8.ttl> ;
+ mf:result <test-bad-utf8.nt> .
diff --git a/tests/lax/test-bad-utf8.nt b/tests/lax/test-bad-utf8.nt
new file mode 100644
index 00000000..6d73993d
--- /dev/null
+++ b/tests/lax/test-bad-utf8.nt
@@ -0,0 +1,3 @@
+<http://example.org/thing> <http://example.org/comment> "Impossible bytes: \uFFFD \uFFFD" .
+<http://example.org/thing> <http://example.org/comment> "2 continuation bytes: \uFFFD" .
+<http://example.org/thing> <http://example.org/comment> "Missing continuation: \uFFFD" .
diff --git a/tests/lax/test-bad-utf8.ttl b/tests/lax/test-bad-utf8.ttl
new file mode 100644
index 00000000..2c105f5b
--- /dev/null
+++ b/tests/lax/test-bad-utf8.ttl
@@ -0,0 +1,3 @@
+<http://example.org/thing> <http://example.org/comment> "Impossible bytes: þ ÿ" .
+<http://example.org/thing> <http://example.org/comment> "2 continuation bytes: €¿" .
+<http://example.org/thing> <http://example.org/comment> "Missing continuation: À" .