From d22653dfe356e3da1354cdb0f7915e29c4a33e3b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 31 Mar 2023 10:50:12 -0400 Subject: Factor out NTriples reader --- test/extra/bad/bad-blank-node-label.nt | 1 + test/extra/bad/bad-trailing-garbage.nt | 1 + test/extra/bad/manifest.ttl | 13 +++++++++++++ test/extra/good/manifest.ttl | 7 ------- test/extra/good/test-out-of-range-unicode.nt | 1 - test/extra/good/test-out-of-range-unicode.ttl | 1 - test/extra/lax/manifest.ttl | 7 +++++++ test/extra/lax/test-out-of-range-unicode.nt | 1 + test/extra/lax/test-out-of-range-unicode.ttl | 1 + 9 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 test/extra/bad/bad-blank-node-label.nt create mode 100644 test/extra/bad/bad-trailing-garbage.nt delete mode 100644 test/extra/good/test-out-of-range-unicode.nt delete mode 100644 test/extra/good/test-out-of-range-unicode.ttl create mode 100644 test/extra/lax/test-out-of-range-unicode.nt create mode 100644 test/extra/lax/test-out-of-range-unicode.ttl (limited to 'test/extra') diff --git a/test/extra/bad/bad-blank-node-label.nt b/test/extra/bad/bad-blank-node-label.nt new file mode 100644 index 00000000..d178a623 --- /dev/null +++ b/test/extra/bad/bad-blank-node-label.nt @@ -0,0 +1 @@ + _nocolon . diff --git a/test/extra/bad/bad-trailing-garbage.nt b/test/extra/bad/bad-trailing-garbage.nt new file mode 100644 index 00000000..79790812 --- /dev/null +++ b/test/extra/bad/bad-trailing-garbage.nt @@ -0,0 +1 @@ + . diff --git a/test/extra/bad/manifest.ttl b/test/extra/bad/manifest.ttl index 9dda56b2..7ab5a427 100644 --- a/test/extra/bad/manifest.ttl +++ b/test/extra/bad/manifest.ttl @@ -10,8 +10,10 @@ <#bad-a-subject> <#bad-base> <#bad-blank> + <#bad-blank-node-label> <#bad-blank-predicate> <#bad-blank-syntax> + <#bad-blank-syntax> <#bad-bom> <#bad-char-in-local> <#bad-char-in-prefix> @@ -78,6 +80,7 @@ <#bad-semicolon-after-subject> <#bad-string> <#bad-subject> + <#bad-trailing-garbage> <#bad-true-predicate> <#bad-true-subject> <#bad-uri-escape> @@ -107,6 +110,11 @@ mf:action ; mf:name "bad-blank" . +<#bad-blank-node-label> + a rdft:TestNTriplesNegativeSyntax ; + mf:action ; + mf:name "bad-blank-node-label" . + <#bad-blank-predicate> a rdft:TestTurtleNegativeSyntax ; mf:action ; @@ -447,6 +455,11 @@ mf:action ; mf:name "bad-subject" . +<#bad-trailing-garbage> + a rdft:TestNTriplesNegativeSyntax ; + mf:action ; + mf:name "bad-trailing-garbage" . + <#bad-true-predicate> a rdft:TestTurtleNegativeSyntax ; mf:action ; diff --git a/test/extra/good/manifest.ttl b/test/extra/good/manifest.ttl index c8bfa6f8..bce7c564 100644 --- a/test/extra/good/manifest.ttl +++ b/test/extra/good/manifest.ttl @@ -29,7 +29,6 @@ <#test-long-utf8> <#test-no-spaces> <#test-non-curie-uri> - <#test-out-of-range-unicode> <#test-prefix> <#test-quote-escapes> <#test-rel> @@ -177,12 +176,6 @@ mf:name "test-non-curie-uri" ; mf:result . -<#test-out-of-range-unicode> - a rdft:TestTurtleEval ; - mf:action ; - mf:name "test-out-of-range-unicode" ; - mf:result . - <#test-prefix> a rdft:TestTurtleEval ; mf:action ; diff --git a/test/extra/good/test-out-of-range-unicode.nt b/test/extra/good/test-out-of-range-unicode.nt deleted file mode 100644 index 5def9e31..00000000 --- a/test/extra/good/test-out-of-range-unicode.nt +++ /dev/null @@ -1 +0,0 @@ - "\uFFFD" . diff --git a/test/extra/good/test-out-of-range-unicode.ttl b/test/extra/good/test-out-of-range-unicode.ttl deleted file mode 100644 index 7e64785a..00000000 --- a/test/extra/good/test-out-of-range-unicode.ttl +++ /dev/null @@ -1 +0,0 @@ - "\U00110000" . diff --git a/test/extra/lax/manifest.ttl b/test/extra/lax/manifest.ttl index 5fd50f50..c68f0176 100644 --- a/test/extra/lax/manifest.ttl +++ b/test/extra/lax/manifest.ttl @@ -15,6 +15,7 @@ <#test-bad-utf8-nt> <#test-bad-utf8-ttl> <#test-lone-list> + <#test-out-of-range-unicode> ) . <#test-bad-string-nt> @@ -70,3 +71,9 @@ mf:action ; mf:name "test-lone-list" ; mf:result . + +<#test-out-of-range-unicode> + a rdft:TestTurtleNegativeSyntax ; + mf:action ; + mf:name "test-out-of-range-unicode" ; + mf:result . diff --git a/test/extra/lax/test-out-of-range-unicode.nt b/test/extra/lax/test-out-of-range-unicode.nt new file mode 100644 index 00000000..5def9e31 --- /dev/null +++ b/test/extra/lax/test-out-of-range-unicode.nt @@ -0,0 +1 @@ + "\uFFFD" . diff --git a/test/extra/lax/test-out-of-range-unicode.ttl b/test/extra/lax/test-out-of-range-unicode.ttl new file mode 100644 index 00000000..7e64785a --- /dev/null +++ b/test/extra/lax/test-out-of-range-unicode.ttl @@ -0,0 +1 @@ + "\U00110000" . -- cgit v1.2.1