aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-11-11 13:59:57 +0100
committerDavid Robillard <d@drobilla.net>2018-11-11 13:59:57 +0100
commit35b439b93c968356915b856dd8f77df9dad11cda (patch)
tree6d742fd11534377a18e699b3cab82da74a8b2e3d
parent7b55df3f32060bdccb6fcb679472f11dba54e66e (diff)
downloadserd-35b439b93c968356915b856dd8f77df9dad11cda.tar.gz
serd-35b439b93c968356915b856dd8f77df9dad11cda.tar.bz2
serd-35b439b93c968356915b856dd8f77df9dad11cda.zip
Add test for writing URIs that can not be shortened
-rw-r--r--tests/good/manifest.nt28
-rw-r--r--tests/good/manifest.ttl7
-rw-r--r--tests/good/test-non-curie-uri.nt1
-rw-r--r--tests/good/test-non-curie-uri.ttl3
4 files changed, 28 insertions, 11 deletions
diff --git a/tests/good/manifest.nt b/tests/good/manifest.nt
index 553c193e..c15d6440 100644
--- a/tests/good/manifest.nt
+++ b/tests/good/manifest.nt
@@ -71,26 +71,28 @@ _:b34 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw
_: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-no-spaces> .
_: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-num> .
+_:b36 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-non-curie-uri> .
_: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-out-of-range-unicode> .
+_:b37 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-num> .
_: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-prefix> .
+_:b38 <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> .
_: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-pretty> .
+_:b39 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-prefix> .
_: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-rel> .
+_:b40 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-pretty> .
_: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-semi-dot> .
+_:b41 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-rel> .
_: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-uri-escape> .
+_:b42 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-semi-dot> .
_: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#test-uri> .
+_:b43 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-uri-escape> .
_: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#test-utf8-uri> .
+_:b44 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-uri> .
_:b44 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b45 .
-_:b45 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#UTF-8> .
-_:b45 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:b45 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-utf8-uri> .
+_:b45 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b46 .
+_:b46 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#UTF-8> .
+_:b46 <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> .
@@ -230,6 +232,10 @@ _:b45 <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-no-spaces> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-no-spaces" .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-no-spaces> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-no-spaces.ttl> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-no-spaces> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#result> <http://drobilla.net/sw/serd/tests/good/test-no-spaces.nt> .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-non-curie-uri> <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-non-curie-uri> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-non-curie-uri" .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-non-curie-uri> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-non-curie-uri.ttl> .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-non-curie-uri> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#result> <http://drobilla.net/sw/serd/tests/good/test-non-curie-uri.nt> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-num> <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-num> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-num" .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-num> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-num.ttl> .
diff --git a/tests/good/manifest.ttl b/tests/good/manifest.ttl
index 72012bbc..15897f9d 100644
--- a/tests/good/manifest.ttl
+++ b/tests/good/manifest.ttl
@@ -42,6 +42,7 @@
<#test-list>
<#test-long-string>
<#test-no-spaces>
+ <#test-non-curie-uri>
<#test-num>
<#test-out-of-range-unicode>
<#test-prefix>
@@ -263,6 +264,12 @@
mf:action <test-no-spaces.ttl> ;
mf:result <test-no-spaces.nt> .
+<#test-non-curie-uri>
+ rdf:type rdft:TestTurtleEval ;
+ mf:name "test-non-curie-uri" ;
+ mf:action <test-non-curie-uri.ttl> ;
+ mf:result <test-non-curie-uri.nt> .
+
<#test-num>
rdf:type rdft:TestTurtleEval ;
mf:name "test-num" ;
diff --git a/tests/good/test-non-curie-uri.nt b/tests/good/test-non-curie-uri.nt
new file mode 100644
index 00000000..502a8754
--- /dev/null
+++ b/tests/good/test-non-curie-uri.nt
@@ -0,0 +1 @@
+<http://example.org/s> <http://example.org/p> <http://example.org/notacurie.> .
diff --git a/tests/good/test-non-curie-uri.ttl b/tests/good/test-non-curie-uri.ttl
new file mode 100644
index 00000000..40734514
--- /dev/null
+++ b/tests/good/test-non-curie-uri.ttl
@@ -0,0 +1,3 @@
+@prefix eg: <http://example.org/> .
+
+eg:s eg:p <http://example.org/notacurie.> .