aboutsummaryrefslogtreecommitdiffstats
path: root/test/extra
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-04-15 17:52:44 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit8c67f9eba47d30913749e607c440b170a5cbd804 (patch)
tree01d9750c6e646c76519e3a00bb200d6312e65ffc /test/extra
parent7ffa2c0488fcd96c3c12713e5650633eb03e91f7 (diff)
downloadserd-8c67f9eba47d30913749e607c440b170a5cbd804.tar.gz
serd-8c67f9eba47d30913749e607c440b170a5cbd804.tar.bz2
serd-8c67f9eba47d30913749e607c440b170a5cbd804.zip
[WIP] Expand URIs in reader
This expands relative and prefixed URIs in the reader on the stack, rather than passing them to the caller to be dealt with. This pushes these context-full forms to the edge of the system as much as possible to minimise the headaches they can cause. Towards having stricter guarantees about nodes and eliminating the CURIE node type altogether.
Diffstat (limited to 'test/extra')
-rw-r--r--test/extra/bad/bad-prefix-dot.ttl1
-rw-r--r--test/extra/bad/manifest.ttl8
-rw-r--r--test/extra/full/full-uris.ttl6
-rw-r--r--test/extra/good/manifest.ttl14
-rw-r--r--test/extra/good/test-local-name-ends-with-dot.nt1
-rw-r--r--test/extra/good/test-local-name-escapes.nt17
-rw-r--r--test/extra/good/test-local-name-escapes.ttl19
7 files changed, 62 insertions, 4 deletions
diff --git a/test/extra/bad/bad-prefix-dot.ttl b/test/extra/bad/bad-prefix-dot.ttl
new file mode 100644
index 00000000..7b02211f
--- /dev/null
+++ b/test/extra/bad/bad-prefix-dot.ttl
@@ -0,0 +1 @@
+@prefix dotted.: <http://example.org/> .
diff --git a/test/extra/bad/manifest.ttl b/test/extra/bad/manifest.ttl
index cd4aee24..f930b812 100644
--- a/test/extra/bad/manifest.ttl
+++ b/test/extra/bad/manifest.ttl
@@ -74,8 +74,9 @@
<#bad-object2>
<#bad-paths>
<#bad-pn-escape>
- <#bad-prefix-missing-colon>
<#bad-prefix>
+ <#bad-prefix-dot>
+ <#bad-prefix-missing-colon>
<#bad-quote-in-uri>
<#bad-semicolon-after-subject>
<#bad-string>
@@ -436,6 +437,11 @@
mf:action <bad-prefix-missing-colon.ttl> ;
mf:name "bad-prefix-missing-colon" .
+<#bad-prefix-dot>
+ a rdft:TestTurtleNegativeSyntax ;
+ mf:action <bad-prefix-dot.ttl> ;
+ mf:name "bad-prefix-dot" .
+
<#bad-quote-in-uri>
a rdft:TestTurtleNegativeSyntax ;
mf:action <bad-quote-in-uri.ttl> ;
diff --git a/test/extra/full/full-uris.ttl b/test/extra/full/full-uris.ttl
index cfb048df..dd6c5144 100644
--- a/test/extra/full/full-uris.ttl
+++ b/test/extra/full/full-uris.ttl
@@ -1,7 +1,7 @@
@prefix eg: <http://example.org/> .
<http://example.org/s1>
- eg:prefixed false .
+ <http://example.org/prefixed> false .
-eg:s2
- eg:prefixed true .
+<http://example.org/s2>
+ <http://example.org/prefixed> true .
diff --git a/test/extra/good/manifest.ttl b/test/extra/good/manifest.ttl
index 7c356285..11a7ec5e 100644
--- a/test/extra/good/manifest.ttl
+++ b/test/extra/good/manifest.ttl
@@ -27,6 +27,8 @@
<#test-id>
<#test-list-in-blank>
<#test-list-subject>
+ <#test-local-name-ends-with-dot>
+ <#test-local-name-escapes>
<#test-long-backspace-escape>
<#test-long-delete-escape>
<#test-long-form-feed-escape>
@@ -169,6 +171,18 @@
mf:name "test-list-subject" ;
mf:result <test-list-subject.nt> .
+<#test-local-name-ends-with-dot>
+ a rdft:TestTurtleEval ;
+ mf:action <test-local-name-ends-with-dot.ttl> ;
+ mf:name "test-local-name-ends-with-dot" ;
+ mf:result <test-local-name-ends-with-dot.nt> .
+
+<#test-local-name-escapes>
+ a rdft:TestTurtleEval ;
+ mf:action <test-local-name-escapes.ttl> ;
+ mf:name "test-local-name-escapes" ;
+ mf:result <test-local-name-escapes.nt> .
+
<#test-long-backspace-escape>
a rdft:TestTurtleEval ;
mf:action <test-long-backspace-escape.ttl> ;
diff --git a/test/extra/good/test-local-name-ends-with-dot.nt b/test/extra/good/test-local-name-ends-with-dot.nt
new file mode 100644
index 00000000..3285348a
--- /dev/null
+++ b/test/extra/good/test-local-name-ends-with-dot.nt
@@ -0,0 +1 @@
+<http://example.org/eg#s> <http://example.org/eg#p> <http://example.org/eg#foo.> .
diff --git a/test/extra/good/test-local-name-escapes.nt b/test/extra/good/test-local-name-escapes.nt
new file mode 100644
index 00000000..a6362d7a
--- /dev/null
+++ b/test/extra/good/test-local-name-escapes.nt
@@ -0,0 +1,17 @@
+<http://example.org/s> <http://example.org/p> <http://example.org/o'> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o!> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o#> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o$> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o%> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o&> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o(> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o)> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o*> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o+> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o,> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o/> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o;> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o=> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o?> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o@> .
+<http://example.org/s> <http://example.org/p> <http://example.org/o~> .
diff --git a/test/extra/good/test-local-name-escapes.ttl b/test/extra/good/test-local-name-escapes.ttl
new file mode 100644
index 00000000..8c5fce37
--- /dev/null
+++ b/test/extra/good/test-local-name-escapes.ttl
@@ -0,0 +1,19 @@
+@prefix eg: <http://example.org/> .
+
+eg:s eg:p eg:o\' .
+eg:s eg:p eg:o\! .
+eg:s eg:p eg:o\# .
+eg:s eg:p eg:o\$ .
+eg:s eg:p eg:o\% .
+eg:s eg:p eg:o\& .
+eg:s eg:p eg:o\( .
+eg:s eg:p eg:o\) .
+eg:s eg:p eg:o\* .
+eg:s eg:p eg:o\+ .
+eg:s eg:p eg:o\, .
+eg:s eg:p eg:o\/ .
+eg:s eg:p eg:o\; .
+eg:s eg:p eg:o\= .
+eg:s eg:p eg:o\? .
+eg:s eg:p eg:o\@ .
+eg:s eg:p eg:o\~ .