From 002e2edc7fee5297b1bc8e1da4932d38e270f8f8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 28 Feb 2023 19:39:35 -0500 Subject: Fix incorrect parsing of strange quote escape patterns --- test/good/manifest.ttl | 7 +++++ test/good/test-quote-escapes.nt | 52 ++++++++++++++++++++++++++++++++ test/good/test-quote-escapes.ttl | 65 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 test/good/test-quote-escapes.nt create mode 100644 test/good/test-quote-escapes.ttl (limited to 'test') 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 ; mf:result . +<#test-quote-escapes> + rdf:type rdft:TestTurtleEval ; + mf:name "test-quote-escapes" ; + mf:action ; + mf:result . + <#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 @@ + "\"" . + "\"\"" . + "\"\"\"" . + "\"\"\"\"" . + "\"" . + "\"\"" . + "\"\"" . + "\"\"\"" . + "\"\"\"" . + "\"\"\"" . + "\"\"\"" . + "\"\"\"" . + "\"\"\"\"" . + "\"\"\"\"" . + "\"\"\"\"" . + "\"\"\"\"" . + "\"\"\"\"" . + "\"\"\"\"" . + "\"\"\"\"" . + "single \" within" . + "single \" within" . + "double \"\" within" . + "double \"\" within" . + "double \"\" within" . + "double \"\" within" . + "triple \"\"\" within" . + "triple \"\"\" within" . + "triple \"\"\" within" . + "triple \"\"\" within" . + "triple \"\"\" within" . + "triple \"\"\" within" . + "triple \"\"\" within" . + "\" start single" . + "\" start single" . + "\"\" start double" . + "\"\" start double" . + "\"\" start double" . + "\"\" start double" . + "\"\"\" start triple" . + "\"\"\" start triple" . + "\"\"\" start triple" . + "\"\"\" start triple" . + "\"\"\" start triple" . + "\"\"\" start triple" . + "\"\"\" start triple" . + "end single \"" . + "end double \"\"" . + "end double \"\"" . + "end triple \"\"\"" . + "end triple \"\"\"" . + "end triple \"\"\"" . + "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 @@ + "\"" . + "\"\"" . + "\"\"\"" . + "\"\"\"\"" . + + """\"""" . + + """"\"""" . + """\"\"""" . + + """""\"""" . + """\""\"""" . + """\""\"""" . + """\"\"\"""" . + """"\"\"""" . + + """""\"\"""" . + """"\""\"""" . + """"\"\"\"""" . + """\"""\"""" . + """\""\"\"""" . + """\"\""\"""" . + """\"\"\"\"""" . + + """single " within""" . + """single \" within""" . + + """double "" within""" . + """double "\" within""" . + """double \"" within""" . + """double \"\" within""" . + + """triple ""\" within""" . + """triple "\"" within""" . + """triple "\"\" within""" . + """triple \""" within""" . + """triple \""\" within""" . + """triple \"\"" within""" . + """triple \"\"\" within""" . + + """" start single""" . + """\" start single""" . + + """"" start double""" . + """"\" start double""" . + """\"" start double""" . + """\"\" start double""" . + + """""\" start triple""" . + """"\"" start triple""" . + """"\"\" start triple""" . + """\""" start triple""" . + """\""\" start triple""" . + """\"\"" start triple""" . + """\"\"\" start triple""" . + + """end single \"""" . + + """end double "\"""" . + """end double \"\"""" . + + """end triple ""\"""" . + """end triple "\"\"""" . + """end triple \""\"""" . + """end triple \"\"\"""" . -- cgit v1.2.1