From f7ffff1e75634909da60ea63a7c52f1a001220b8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 27 Oct 2019 19:48:02 +0100 Subject: Fix EOF handling while reading in bulk or from strings --- tests/bad/bad-eof-after-quotes.ttl | 3 +++ tests/bad/bad-eof-at-string-start.ttl | 3 +++ tests/bad/bad-eof-in-long-string.ttl | 3 +++ tests/bad/bad-eof-in-uri-scheme.nt | 1 + tests/bad/manifest.ttl | 24 ++++++++++++++++++++++++ 5 files changed, 34 insertions(+) create mode 100644 tests/bad/bad-eof-after-quotes.ttl create mode 100644 tests/bad/bad-eof-at-string-start.ttl create mode 100644 tests/bad/bad-eof-in-long-string.ttl create mode 100644 tests/bad/bad-eof-in-uri-scheme.nt (limited to 'tests') diff --git a/tests/bad/bad-eof-after-quotes.ttl b/tests/bad/bad-eof-after-quotes.ttl new file mode 100644 index 00000000..40e429cb --- /dev/null +++ b/tests/bad/bad-eof-after-quotes.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +<> eg:comment "" \ No newline at end of file diff --git a/tests/bad/bad-eof-at-string-start.ttl b/tests/bad/bad-eof-at-string-start.ttl new file mode 100644 index 00000000..93d20bcc --- /dev/null +++ b/tests/bad/bad-eof-at-string-start.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +<> eg:comment " \ No newline at end of file diff --git a/tests/bad/bad-eof-in-long-string.ttl b/tests/bad/bad-eof-in-long-string.ttl new file mode 100644 index 00000000..2ef179a8 --- /dev/null +++ b/tests/bad/bad-eof-in-long-string.ttl @@ -0,0 +1,3 @@ +@prefix eg: . + +<> eg:comment """This is the string that never ends \ No newline at end of file diff --git a/tests/bad/bad-eof-in-uri-scheme.nt b/tests/bad/bad-eof-in-uri-scheme.nt new file mode 100644 index 00000000..de892dcf --- /dev/null +++ b/tests/bad/bad-eof-in-uri-scheme.nt @@ -0,0 +1 @@ + <#bad-datatype> <#bad-dot-after-subject> + <#bad-eof-after-quotes> + <#bad-eof-at-string-start> <#bad-eof-in-blank> <#bad-eof-in-escape> <#bad-eof-in-lang-suffix> @@ -38,9 +40,11 @@ <#bad-eof-in-object-list2> <#bad-eof-in-object-list> <#bad-eof-in-predicate-list> + <#bad-eof-in-long-string> <#bad-eof-in-string> <#bad-eof-in-triple-quote> <#bad-eof-in-uri> + <#bad-eof-in-uri-scheme> <#bad-escape> <#bad-ext-namedblank-op> <#bad-hex-digit> @@ -186,6 +190,16 @@ mf:name "bad-dot-after-subject" ; mf:action . +<#bad-eof-after-quotes> + rdf:type rdft:TestTurtleNegativeSyntax ; + mf:name "bad-eof-after-quotes" ; + mf:action . + +<#bad-eof-at-string-start> + rdf:type rdft:TestTurtleNegativeSyntax ; + mf:name "bad-eof-at-string-start" ; + mf:action . + <#bad-eof-in-blank> rdf:type rdft:TestTurtleNegativeSyntax ; mf:name "bad-eof-in-blank" ; @@ -226,6 +240,11 @@ mf:name "bad-eof-in-predicate-list" ; mf:action . +<#bad-eof-in-long-string> + rdf:type rdft:TestTurtleNegativeSyntax ; + mf:name "bad-eof-in-long-string" ; + mf:action . + <#bad-eof-in-string> rdf:type rdft:TestTurtleNegativeSyntax ; mf:name "bad-eof-in-string" ; @@ -241,6 +260,11 @@ mf:name "bad-eof-in-uri" ; mf:action . +<#bad-eof-in-uri-scheme> + rdf:type rdft:TestNTriplesNegativeSyntax ; + mf:name "bad-eof-in-uri-scheme" ; + mf:action . + <#bad-escape> rdf:type rdft:TestTurtleNegativeSyntax ; mf:name "bad-escape" ; -- cgit v1.2.1