aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-10 16:15:20 +0200
committerDavid Robillard <d@drobilla.net>2018-05-27 12:09:26 +0200
commit120b99b1cb02f153ec6f4071a8071ac08cb9d074 (patch)
treeae91347fa29a7509104c44a172bf020ce1981c9d /tests
parent5dbedeebdc57603a0864798f32cf6c28264f76e5 (diff)
downloadserd-120b99b1cb02f153ec6f4071a8071ac08cb9d074.tar.gz
serd-120b99b1cb02f153ec6f4071a8071ac08cb9d074.tar.bz2
serd-120b99b1cb02f153ec6f4071a8071ac08cb9d074.zip
Add test for writing form feeds in Turtle
Diffstat (limited to 'tests')
-rw-r--r--tests/good/manifest.nt42
-rw-r--r--tests/good/manifest.ttl7
-rw-r--r--tests/good/test-form-feed.nt3
-rw-r--r--tests/good/test-form-feed.ttl5
4 files changed, 39 insertions, 18 deletions
diff --git a/tests/good/manifest.nt b/tests/good/manifest.nt
index f39d21c1..ed9bcee0 100644
--- a/tests/good/manifest.nt
+++ b/tests/good/manifest.nt
@@ -53,40 +53,42 @@ _:b25 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw
_:b25 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b26 .
_:b26 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-ext-namedblank-prefix> .
_:b26 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b27 .
-_:b27 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-id> .
+_:b27 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-form-feed> .
_:b27 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b28 .
-_:b28 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-lang> .
+_:b28 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-id> .
_:b28 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b29 .
-_:b29 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list-in-blank> .
+_:b29 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-lang> .
_:b29 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b30 .
-_:b30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list-subject> .
+_:b30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list-in-blank> .
_:b30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b31 .
-_:b31 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list> .
+_:b31 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list-subject> .
_:b31 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b32 .
-_:b32 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-long-string> .
+_:b32 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list> .
_:b32 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b33 .
-_:b33 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-no-spaces> .
+_:b33 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-long-string> .
_:b33 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b34 .
-_:b34 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-num> .
+_:b34 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-no-spaces> .
_:b34 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b35 .
-_:b35 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-out-of-range-unicode> .
+_:b35 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-num> .
_:b35 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b36 .
-_:b36 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-prefix> .
+_:b36 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-out-of-range-unicode> .
_:b36 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b37 .
-_:b37 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-pretty> .
+_:b37 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-prefix> .
_:b37 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b38 .
-_:b38 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-rel> .
+_:b38 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-pretty> .
_:b38 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b39 .
-_:b39 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-semi-dot> .
+_:b39 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-rel> .
_:b39 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b40 .
-_:b40 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-uri-escape> .
+_:b40 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-semi-dot> .
_:b40 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b41 .
-_:b41 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-uri> .
+_:b41 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-uri-escape> .
_:b41 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b42 .
-_:b42 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-utf8-uri> .
+_:b42 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-uri> .
_:b42 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b43 .
-_:b43 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#UTF-8> .
-_:b43 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:b43 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-utf8-uri> .
+_:b43 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b44 .
+_:b44 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#UTF-8> .
+_:b44 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-14> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/rdftest#TestTurtleEval> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-14> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-14" .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-14> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-14.ttl> .
@@ -190,6 +192,10 @@ _:b43 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-ext-namedblank-prefix> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-ext-namedblank-prefix" .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-ext-namedblank-prefix> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-ext-namedblank-prefix.ttl> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-ext-namedblank-prefix> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#result> <http://drobilla.net/sw/serd/tests/good/test-ext-namedblank-prefix.nt> .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-form-feed> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/rdftest#TestTurtleEval> .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-form-feed> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-form-feed" .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-form-feed> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-form-feed.ttl> .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-form-feed> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#result> <http://drobilla.net/sw/serd/tests/good/test-form-feed.nt> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-id> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/rdftest#TestTurtleEval> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-id> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-id" .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-id> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-id.ttl> .
diff --git a/tests/good/manifest.ttl b/tests/good/manifest.ttl
index e3299aad..8bca9738 100644
--- a/tests/good/manifest.ttl
+++ b/tests/good/manifest.ttl
@@ -33,6 +33,7 @@
<#test-escapes>
<#test-ext-namedblank-iri>
<#test-ext-namedblank-prefix>
+ <#test-form-feed>
<#test-id>
<#test-lang>
<#test-list-in-blank>
@@ -207,6 +208,12 @@
mf:action <test-ext-namedblank-prefix.ttl> ;
mf:result <test-ext-namedblank-prefix.nt> .
+<#test-form-feed>
+ rdf:type rdft:TestTurtleEval ;
+ mf:name "test-form-feed" ;
+ mf:action <test-form-feed.ttl> ;
+ mf:result <test-form-feed.nt> .
+
<#test-id>
rdf:type rdft:TestTurtleEval ;
mf:name "test-id" ;
diff --git a/tests/good/test-form-feed.nt b/tests/good/test-form-feed.nt
new file mode 100644
index 00000000..1614ca5b
--- /dev/null
+++ b/tests/good/test-form-feed.nt
@@ -0,0 +1,3 @@
+<http://example.org/thing> <http://example.org/label> "\u000C" .
+<http://example.org/thing> <http://example.org/label> "\u000C" .
+<http://example.org/thing> <http://example.org/label> "\n\u000C\n" .
diff --git a/tests/good/test-form-feed.ttl b/tests/good/test-form-feed.ttl
new file mode 100644
index 00000000..4929259b
--- /dev/null
+++ b/tests/good/test-form-feed.ttl
@@ -0,0 +1,5 @@
+<http://example.org/thing> <http://example.org/label> "\u000C" .
+<http://example.org/thing> <http://example.org/label> " " .
+<http://example.org/thing> <http://example.org/label> """
+
+""" .