aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-07-30 19:30:34 +0200
committerDavid Robillard <d@drobilla.net>2018-07-30 19:31:03 +0200
commit3267bb312f50746202226d29cc196bb47941e4d5 (patch)
treeff7de7db894279e73090d46c57313f994b7139e8 /tests
parent8acc3319d2df2dbd2490843e1d49439ee20a0780 (diff)
downloadserd-3267bb312f50746202226d29cc196bb47941e4d5.tar.gz
serd-3267bb312f50746202226d29cc196bb47941e4d5.tar.bz2
serd-3267bb312f50746202226d29cc196bb47941e4d5.zip
Fix resolving some URIs against base URIs with no trailing slash
Diffstat (limited to 'tests')
-rw-r--r--tests/good/manifest.nt54
-rw-r--r--tests/good/manifest.ttl7
-rw-r--r--tests/good/test-empty-path-base.nt1
-rw-r--r--tests/good/test-empty-path-base.ttl3
4 files changed, 41 insertions, 24 deletions
diff --git a/tests/good/manifest.nt b/tests/good/manifest.nt
index ed9bcee0..553c193e 100644
--- a/tests/good/manifest.nt
+++ b/tests/good/manifest.nt
@@ -43,52 +43,54 @@ _:b20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw
_:b20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b21 .
_:b21 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-digit-start-pname> .
_:b21 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b22 .
-_:b22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty> .
+_:b22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty-path-base> .
_:b22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b23 .
-_:b23 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-eof-at-page-end> .
+_:b23 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty> .
_:b23 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b24 .
-_:b24 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-escapes> .
+_:b24 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-eof-at-page-end> .
_:b24 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b25 .
-_:b25 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-ext-namedblank-iri> .
+_:b25 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-escapes> .
_: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#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-ext-namedblank-iri> .
_: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-form-feed> .
+_:b27 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-ext-namedblank-prefix> .
_: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-id> .
+_:b28 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-form-feed> .
_: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-lang> .
+_:b29 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-id> .
_: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-in-blank> .
+_:b30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-lang> .
_: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-subject> .
+_:b31 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list-in-blank> .
_: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-list> .
+_:b32 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list-subject> .
_: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-long-string> .
+_:b33 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-list> .
_: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-no-spaces> .
+_:b34 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-long-string> .
_: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-num> .
+_: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-out-of-range-unicode> .
+_: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#rest> _:b37 .
-_: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#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#rest> _:b38 .
-_: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#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-prefix> .
_: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-rel> .
+_: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#rest> _:b40 .
-_: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#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-rel> .
_: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-escape> .
+_: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#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> .
+_: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#rest> _:b43 .
-_: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#first> <http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-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> .
+_: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#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> .
<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> .
@@ -172,6 +174,10 @@ _:b44 <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-digit-start-pname> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-digit-start-pname" .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-digit-start-pname> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-digit-start-pname.ttl> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-digit-start-pname> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#result> <http://drobilla.net/sw/serd/tests/good/test-digit-start-pname.nt> .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty-path-base> <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-empty-path-base> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-empty-path-base" .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty-path-base> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-empty-path-base.ttl> .
+<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty-path-base> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#result> <http://drobilla.net/sw/serd/tests/good/test-empty-path-base.nt> .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty> <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-empty> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name> "test-empty" .
<http://drobilla.net/sw/serd/tests/good/manifest.ttl#test-empty> <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action> <http://drobilla.net/sw/serd/tests/good/test-empty.ttl> .
diff --git a/tests/good/manifest.ttl b/tests/good/manifest.ttl
index 8bca9738..72012bbc 100644
--- a/tests/good/manifest.ttl
+++ b/tests/good/manifest.ttl
@@ -28,6 +28,7 @@
<#test-cr>
<#test-delete>
<#test-digit-start-pname>
+ <#test-empty-path-base>
<#test-empty>
<#test-eof-at-page-end>
<#test-escapes>
@@ -178,6 +179,12 @@
mf:action <test-digit-start-pname.ttl> ;
mf:result <test-digit-start-pname.nt> .
+<#test-empty-path-base>
+ rdf:type rdft:TestTurtleEval ;
+ mf:name "test-empty-path-base" ;
+ mf:action <test-empty-path-base.ttl> ;
+ mf:result <test-empty-path-base.nt> .
+
<#test-empty>
rdf:type rdft:TestTurtleEval ;
mf:name "test-empty" ;
diff --git a/tests/good/test-empty-path-base.nt b/tests/good/test-empty-path-base.nt
new file mode 100644
index 00000000..9ad50617
--- /dev/null
+++ b/tests/good/test-empty-path-base.nt
@@ -0,0 +1 @@
+<http://example.org/instance> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Thing> .
diff --git a/tests/good/test-empty-path-base.ttl b/tests/good/test-empty-path-base.ttl
new file mode 100644
index 00000000..a5cdd1e0
--- /dev/null
+++ b/tests/good/test-empty-path-base.ttl
@@ -0,0 +1,3 @@
+@base <http://example.org> .
+
+<instance> a <http://example.org/Thing> .