aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-03-29 06:48:16 -0400
committerDavid Robillard <d@drobilla.net>2024-03-29 06:49:14 -0400
commitdc3aeed6ce84736100d713cac8f40e46d16d1289 (patch)
treec266ecb76b16c5c9131469bc82a054f501e89010 /test
parent6aed064084c8c1af02adb46b0066aaee1f436edf (diff)
downloadserd-dc3aeed6ce84736100d713cac8f40e46d16d1289.tar.gz
serd-dc3aeed6ce84736100d713cac8f40e46d16d1289.tar.bz2
serd-dc3aeed6ce84736100d713cac8f40e46d16d1289.zip
Support reading lone lists in lax mode
This allows parsing documents like "(42) ."
Diffstat (limited to 'test')
-rw-r--r--test/extra/lax/manifest.ttl7
-rw-r--r--test/extra/lax/test-lone-list.nt2
-rw-r--r--test/extra/lax/test-lone-list.ttl1
3 files changed, 10 insertions, 0 deletions
diff --git a/test/extra/lax/manifest.ttl b/test/extra/lax/manifest.ttl
index e2930a81..a04a74f6 100644
--- a/test/extra/lax/manifest.ttl
+++ b/test/extra/lax/manifest.ttl
@@ -9,6 +9,7 @@
<#test-bad-string>
<#test-bad-uri>
<#test-bad-utf8>
+ <#test-lone-list>
) .
<#test-bad-string>
@@ -28,3 +29,9 @@
mf:action <test-bad-utf8.ttl> ;
mf:name "test-bad-utf8" ;
mf:result <test-bad-utf8.nt> .
+
+<#test-lone-list>
+ a rdft:TestTurtleNegativeSyntax ;
+ mf:name "test-lone-list" ;
+ mf:action <test-lone-list.ttl> ;
+ mf:result <test-lone-list.nt> .
diff --git a/test/extra/lax/test-lone-list.nt b/test/extra/lax/test-lone-list.nt
new file mode 100644
index 00000000..400c2aba
--- /dev/null
+++ b/test/extra/lax/test-lone-list.nt
@@ -0,0 +1,2 @@
+_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "42"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
diff --git a/test/extra/lax/test-lone-list.ttl b/test/extra/lax/test-lone-list.ttl
new file mode 100644
index 00000000..e9c593b8
--- /dev/null
+++ b/test/extra/lax/test-lone-list.ttl
@@ -0,0 +1 @@
+(42) .