From 45902fbbaa11e8c38944b38182afb92bc0641ec9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 13 Jul 2021 14:39:11 -0400 Subject: Test lax NTriples parsing separately --- test/lax/manifest.ttl | 60 ++++++++++++++++++++++++++++++--------- test/lax/test-bad-string-out.nq | 1 + test/lax/test-bad-string-out.nt | 1 + test/lax/test-bad-string.nt | 2 ++ test/lax/test-bad-uri-nq-out.nq | 4 +++ test/lax/test-bad-uri-out.nt | 4 +++ test/lax/test-bad-uri.nq | 4 +++ test/lax/test-bad-uri.nt | 4 +-- test/lax/test-bad-uri.ttl | 9 +++--- test/lax/test-bad-utf8-nq-out.nq | 3 ++ test/lax/test-bad-utf8-nt-out.nt | 3 ++ test/lax/test-bad-utf8-ttl-out.nt | 6 ++++ test/lax/test-bad-utf8.nq | 3 ++ test/lax/test-bad-utf8.nt | 9 ++---- 14 files changed, 88 insertions(+), 25 deletions(-) create mode 100644 test/lax/test-bad-string-out.nq create mode 100644 test/lax/test-bad-string-out.nt create mode 100644 test/lax/test-bad-uri-nq-out.nq create mode 100644 test/lax/test-bad-uri-out.nt create mode 100644 test/lax/test-bad-uri.nq create mode 100644 test/lax/test-bad-utf8-nq-out.nq create mode 100644 test/lax/test-bad-utf8-nt-out.nt create mode 100644 test/lax/test-bad-utf8-ttl-out.nt create mode 100644 test/lax/test-bad-utf8.nq (limited to 'test') diff --git a/test/lax/manifest.ttl b/test/lax/manifest.ttl index c3218a6b..b63da6d4 100644 --- a/test/lax/manifest.ttl +++ b/test/lax/manifest.ttl @@ -7,33 +7,67 @@ rdf:type mf:Manifest ; rdfs:comment "Serd lax syntax test cases" ; mf:entries ( - <#test-bad-string> - <#test-bad-uri> - <#test-bad-utf8> + <#test-bad-string-ttl> + <#test-bad-string-nt> + <#test-bad-uri-ttl> + <#test-bad-uri-nt> + <#test-bad-uri-nq> + <#test-bad-utf8-ttl> + <#test-bad-utf8-nt> + <#test-bad-utf8-nq> <#test-lone-list> ) . -<#test-bad-string> +<#test-bad-string-ttl> rdf:type rdft:TestTurtleNegativeSyntax ; - mf:name "test-bad-string" ; + mf:name "test-bad-string-ttl" ; mf:action ; - mf:result . + mf:result . -<#test-bad-uri> +<#test-bad-string-nt> + rdf:type rdft:TestNTriplesNegativeSyntax ; + mf:name "test-bad-string-nt" ; + mf:action ; + mf:result . + +<#test-bad-uri-ttl> rdf:type rdft:TestTurtleNegativeSyntax ; - mf:name "test-bad-uri" ; + mf:name "test-bad-uri-ttl" ; mf:action ; - mf:result . + mf:result . + +<#test-bad-uri-nt> + rdf:type rdft:TestNTriplesNegativeSyntax ; + mf:name "test-bad-uri-nt" ; + mf:action ; + mf:result . + +<#test-bad-uri-nq> + rdf:type rdft:TestNQuadsNegativeSynqax ; + mf:name "test-bad-uri-nq" ; + mf:action ; + mf:result . -<#test-bad-utf8> +<#test-bad-utf8-ttl> rdf:type rdft:TestTurtleNegativeSyntax ; - mf:name "test-bad-utf8" ; + mf:name "test-bad-utf8-ttl" ; mf:action ; - mf:result . + mf:result . + +<#test-bad-utf8-nt> + rdf:type rdft:TestNTriplesNegativeSyntax ; + mf:name "test-bad-utf8-nt" ; + mf:action ; + mf:result . + +<#test-bad-utf8-nq> + rdf:type rdft:TestNQuadsNegativeSynqax ; + mf:name "test-bad-utf8-nq" ; + mf:action ; + mf:result . <#test-lone-list> rdf:type rdft:TestTurtleNegativeSyntax ; mf:name "test-lone-list" ; mf:action ; mf:result . - diff --git a/test/lax/test-bad-string-out.nq b/test/lax/test-bad-string-out.nq new file mode 100644 index 00000000..24f80a2e --- /dev/null +++ b/test/lax/test-bad-string-out.nq @@ -0,0 +1 @@ + "Good" . diff --git a/test/lax/test-bad-string-out.nt b/test/lax/test-bad-string-out.nt new file mode 100644 index 00000000..24f80a2e --- /dev/null +++ b/test/lax/test-bad-string-out.nt @@ -0,0 +1 @@ + "Good" . diff --git a/test/lax/test-bad-string.nt b/test/lax/test-bad-string.nt index 24f80a2e..72eb9621 100644 --- a/test/lax/test-bad-string.nt +++ b/test/lax/test-bad-string.nt @@ -1 +1,3 @@ + "Truncated line + "Bad escape \? " . "Good" . diff --git a/test/lax/test-bad-uri-nq-out.nq b/test/lax/test-bad-uri-nq-out.nq new file mode 100644 index 00000000..8cb00ba7 --- /dev/null +++ b/test/lax/test-bad-uri-nq-out.nq @@ -0,0 +1,4 @@ + . + . + . + . diff --git a/test/lax/test-bad-uri-out.nt b/test/lax/test-bad-uri-out.nt new file mode 100644 index 00000000..8cb00ba7 --- /dev/null +++ b/test/lax/test-bad-uri-out.nt @@ -0,0 +1,4 @@ + . + . + . + . diff --git a/test/lax/test-bad-uri.nq b/test/lax/test-bad-uri.nq new file mode 100644 index 00000000..8f11b1d7 --- /dev/null +++ b/test/lax/test-bad-uri.nq @@ -0,0 +1,4 @@ + . + . + . + . diff --git a/test/lax/test-bad-uri.nt b/test/lax/test-bad-uri.nt index 8cb00ba7..8f11b1d7 100644 --- a/test/lax/test-bad-uri.nt +++ b/test/lax/test-bad-uri.nt @@ -1,4 +1,4 @@ - . + . . - . + . . diff --git a/test/lax/test-bad-uri.ttl b/test/lax/test-bad-uri.ttl index 8f11b1d7..1a724fd1 100644 --- a/test/lax/test-bad-uri.ttl +++ b/test/lax/test-bad-uri.ttl @@ -1,4 +1,5 @@ - . - . - . - . + + , + ; + ; + . diff --git a/test/lax/test-bad-utf8-nq-out.nq b/test/lax/test-bad-utf8-nq-out.nq new file mode 100644 index 00000000..6d73993d --- /dev/null +++ b/test/lax/test-bad-utf8-nq-out.nq @@ -0,0 +1,3 @@ + "Impossible bytes: \uFFFD \uFFFD" . + "2 continuation bytes: \uFFFD" . + "Missing continuation: \uFFFD" . diff --git a/test/lax/test-bad-utf8-nt-out.nt b/test/lax/test-bad-utf8-nt-out.nt new file mode 100644 index 00000000..6d73993d --- /dev/null +++ b/test/lax/test-bad-utf8-nt-out.nt @@ -0,0 +1,3 @@ + "Impossible bytes: \uFFFD \uFFFD" . + "2 continuation bytes: \uFFFD" . + "Missing continuation: \uFFFD" . diff --git a/test/lax/test-bad-utf8-ttl-out.nt b/test/lax/test-bad-utf8-ttl-out.nt new file mode 100644 index 00000000..09200e9d --- /dev/null +++ b/test/lax/test-bad-utf8-ttl-out.nt @@ -0,0 +1,6 @@ + "Impossible bytes: \uFFFD \uFFFD" . + "2 continuation bytes: \uFFFD" . + "Missing continuation: \uFFFD" . + "Impossible bytes: \uFFFD \uFFFD" . + "2 continuation bytes: \uFFFD" . + "Missing continuation: \uFFFD" . diff --git a/test/lax/test-bad-utf8.nq b/test/lax/test-bad-utf8.nq new file mode 100644 index 00000000..2c105f5b --- /dev/null +++ b/test/lax/test-bad-utf8.nq @@ -0,0 +1,3 @@ + "Impossible bytes: þ ÿ" . + "2 continuation bytes: €¿" . + "Missing continuation: À" . diff --git a/test/lax/test-bad-utf8.nt b/test/lax/test-bad-utf8.nt index 09200e9d..2c105f5b 100644 --- a/test/lax/test-bad-utf8.nt +++ b/test/lax/test-bad-utf8.nt @@ -1,6 +1,3 @@ - "Impossible bytes: \uFFFD \uFFFD" . - "2 continuation bytes: \uFFFD" . - "Missing continuation: \uFFFD" . - "Impossible bytes: \uFFFD \uFFFD" . - "2 continuation bytes: \uFFFD" . - "Missing continuation: \uFFFD" . + "Impossible bytes: þ ÿ" . + "2 continuation bytes: €¿" . + "Missing continuation: À" . -- cgit v1.2.1