aboutsummaryrefslogtreecommitdiffstats
path: root/test/good
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-02-28 19:39:35 -0500
committerDavid Robillard <d@drobilla.net>2023-03-31 11:10:52 -0400
commit002e2edc7fee5297b1bc8e1da4932d38e270f8f8 (patch)
treee701cf2bcf6663f3b7dd79234b6f3145e4e46f26 /test/good
parent647179b76fe15e5306a5a4f7ebbc1ad933d5a526 (diff)
downloadserd-002e2edc7fee5297b1bc8e1da4932d38e270f8f8.tar.gz
serd-002e2edc7fee5297b1bc8e1da4932d38e270f8f8.tar.bz2
serd-002e2edc7fee5297b1bc8e1da4932d38e270f8f8.zip
Fix incorrect parsing of strange quote escape patterns
Diffstat (limited to 'test/good')
-rw-r--r--test/good/manifest.ttl7
-rw-r--r--test/good/test-quote-escapes.nt52
-rw-r--r--test/good/test-quote-escapes.ttl65
3 files changed, 124 insertions, 0 deletions
diff --git a/test/good/manifest.ttl b/test/good/manifest.ttl
index 00009c4f..25359fdc 100644
--- a/test/good/manifest.ttl
+++ b/test/good/manifest.ttl
@@ -45,6 +45,7 @@
<#test-out-of-range-unicode>
<#test-prefix>
<#test-pretty>
+ <#test-quote-escapes>
<#test-rel>
<#test-semi-dot>
<#test-uri-escape>
@@ -281,6 +282,12 @@
mf:action <test-pretty.ttl> ;
mf:result <test-pretty.nt> .
+<#test-quote-escapes>
+ rdf:type rdft:TestTurtleEval ;
+ mf:name "test-quote-escapes" ;
+ mf:action <test-quote-escapes.ttl> ;
+ mf:result <test-quote-escapes.nt> .
+
<#test-rel>
rdf:type rdft:TestTurtleEval ;
mf:name "test-rel" ;
diff --git a/test/good/test-quote-escapes.nt b/test/good/test-quote-escapes.nt
new file mode 100644
index 00000000..26c06a8d
--- /dev/null
+++ b/test/good/test-quote-escapes.nt
@@ -0,0 +1,52 @@
+<http://example.org/s> <http://example.org/p> "\"" .
+<http://example.org/s> <http://example.org/p> "\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"" .
+<http://example.org/s> <http://example.org/p> "\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+<http://example.org/s> <http://example.org/p> "single \" within" .
+<http://example.org/s> <http://example.org/p> "single \" within" .
+<http://example.org/s> <http://example.org/p> "double \"\" within" .
+<http://example.org/s> <http://example.org/p> "double \"\" within" .
+<http://example.org/s> <http://example.org/p> "double \"\" within" .
+<http://example.org/s> <http://example.org/p> "double \"\" within" .
+<http://example.org/s> <http://example.org/p> "triple \"\"\" within" .
+<http://example.org/s> <http://example.org/p> "triple \"\"\" within" .
+<http://example.org/s> <http://example.org/p> "triple \"\"\" within" .
+<http://example.org/s> <http://example.org/p> "triple \"\"\" within" .
+<http://example.org/s> <http://example.org/p> "triple \"\"\" within" .
+<http://example.org/s> <http://example.org/p> "triple \"\"\" within" .
+<http://example.org/s> <http://example.org/p> "triple \"\"\" within" .
+<http://example.org/s> <http://example.org/p> "\" start single" .
+<http://example.org/s> <http://example.org/p> "\" start single" .
+<http://example.org/s> <http://example.org/p> "\"\" start double" .
+<http://example.org/s> <http://example.org/p> "\"\" start double" .
+<http://example.org/s> <http://example.org/p> "\"\" start double" .
+<http://example.org/s> <http://example.org/p> "\"\" start double" .
+<http://example.org/s> <http://example.org/p> "\"\"\" start triple" .
+<http://example.org/s> <http://example.org/p> "\"\"\" start triple" .
+<http://example.org/s> <http://example.org/p> "\"\"\" start triple" .
+<http://example.org/s> <http://example.org/p> "\"\"\" start triple" .
+<http://example.org/s> <http://example.org/p> "\"\"\" start triple" .
+<http://example.org/s> <http://example.org/p> "\"\"\" start triple" .
+<http://example.org/s> <http://example.org/p> "\"\"\" start triple" .
+<http://example.org/s> <http://example.org/p> "end single \"" .
+<http://example.org/s> <http://example.org/p> "end double \"\"" .
+<http://example.org/s> <http://example.org/p> "end double \"\"" .
+<http://example.org/s> <http://example.org/p> "end triple \"\"\"" .
+<http://example.org/s> <http://example.org/p> "end triple \"\"\"" .
+<http://example.org/s> <http://example.org/p> "end triple \"\"\"" .
+<http://example.org/s> <http://example.org/p> "end triple \"\"\"" .
diff --git a/test/good/test-quote-escapes.ttl b/test/good/test-quote-escapes.ttl
new file mode 100644
index 00000000..ffe14807
--- /dev/null
+++ b/test/good/test-quote-escapes.ttl
@@ -0,0 +1,65 @@
+<http://example.org/s> <http://example.org/p> "\"" .
+<http://example.org/s> <http://example.org/p> "\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"" .
+<http://example.org/s> <http://example.org/p> "\"\"\"\"" .
+
+<http://example.org/s> <http://example.org/p> """\"""" .
+
+<http://example.org/s> <http://example.org/p> """"\"""" .
+<http://example.org/s> <http://example.org/p> """\"\"""" .
+
+<http://example.org/s> <http://example.org/p> """""\"""" .
+<http://example.org/s> <http://example.org/p> """\""\"""" .
+<http://example.org/s> <http://example.org/p> """\""\"""" .
+<http://example.org/s> <http://example.org/p> """\"\"\"""" .
+<http://example.org/s> <http://example.org/p> """"\"\"""" .
+
+<http://example.org/s> <http://example.org/p> """""\"\"""" .
+<http://example.org/s> <http://example.org/p> """"\""\"""" .
+<http://example.org/s> <http://example.org/p> """"\"\"\"""" .
+<http://example.org/s> <http://example.org/p> """\"""\"""" .
+<http://example.org/s> <http://example.org/p> """\""\"\"""" .
+<http://example.org/s> <http://example.org/p> """\"\""\"""" .
+<http://example.org/s> <http://example.org/p> """\"\"\"\"""" .
+
+<http://example.org/s> <http://example.org/p> """single " within""" .
+<http://example.org/s> <http://example.org/p> """single \" within""" .
+
+<http://example.org/s> <http://example.org/p> """double "" within""" .
+<http://example.org/s> <http://example.org/p> """double "\" within""" .
+<http://example.org/s> <http://example.org/p> """double \"" within""" .
+<http://example.org/s> <http://example.org/p> """double \"\" within""" .
+
+<http://example.org/s> <http://example.org/p> """triple ""\" within""" .
+<http://example.org/s> <http://example.org/p> """triple "\"" within""" .
+<http://example.org/s> <http://example.org/p> """triple "\"\" within""" .
+<http://example.org/s> <http://example.org/p> """triple \""" within""" .
+<http://example.org/s> <http://example.org/p> """triple \""\" within""" .
+<http://example.org/s> <http://example.org/p> """triple \"\"" within""" .
+<http://example.org/s> <http://example.org/p> """triple \"\"\" within""" .
+
+<http://example.org/s> <http://example.org/p> """" start single""" .
+<http://example.org/s> <http://example.org/p> """\" start single""" .
+
+<http://example.org/s> <http://example.org/p> """"" start double""" .
+<http://example.org/s> <http://example.org/p> """"\" start double""" .
+<http://example.org/s> <http://example.org/p> """\"" start double""" .
+<http://example.org/s> <http://example.org/p> """\"\" start double""" .
+
+<http://example.org/s> <http://example.org/p> """""\" start triple""" .
+<http://example.org/s> <http://example.org/p> """"\"" start triple""" .
+<http://example.org/s> <http://example.org/p> """"\"\" start triple""" .
+<http://example.org/s> <http://example.org/p> """\""" start triple""" .
+<http://example.org/s> <http://example.org/p> """\""\" start triple""" .
+<http://example.org/s> <http://example.org/p> """\"\"" start triple""" .
+<http://example.org/s> <http://example.org/p> """\"\"\" start triple""" .
+
+<http://example.org/s> <http://example.org/p> """end single \"""" .
+
+<http://example.org/s> <http://example.org/p> """end double "\"""" .
+<http://example.org/s> <http://example.org/p> """end double \"\"""" .
+
+<http://example.org/s> <http://example.org/p> """end triple ""\"""" .
+<http://example.org/s> <http://example.org/p> """end triple "\"\"""" .
+<http://example.org/s> <http://example.org/p> """end triple \""\"""" .
+<http://example.org/s> <http://example.org/p> """end triple \"\"\"""" .