diff options
author | David Robillard <d@drobilla.net> | 2024-06-07 02:11:40 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-06-07 02:13:02 -0400 |
commit | ecf1f7340a9718199a8e965ffc2f738c7d87f055 (patch) | |
tree | 4249b10a723476f313908fb54e378b7e1743f037 | |
parent | 00732ff12085126b1a62675d224eb42a13de334f (diff) | |
download | serd-ecf1f7340a9718199a8e965ffc2f738c7d87f055.tar.gz serd-ecf1f7340a9718199a8e965ffc2f738c7d87f055.tar.bz2 serd-ecf1f7340a9718199a8e965ffc2f738c7d87f055.zip |
Add test cases for lax TriG parsing
-rw-r--r-- | test/extra/lax/manifest.ttl | 21 | ||||
-rw-r--r-- | test/extra/lax/test-bad-string.trig | 3 | ||||
-rw-r--r-- | test/extra/lax/test-bad-uri.trig | 8 | ||||
-rw-r--r-- | test/extra/lax/test-bad-utf8.trig | 6 |
4 files changed, 38 insertions, 0 deletions
diff --git a/test/extra/lax/manifest.ttl b/test/extra/lax/manifest.ttl index b9890e14..bf51f931 100644 --- a/test/extra/lax/manifest.ttl +++ b/test/extra/lax/manifest.ttl @@ -8,13 +8,16 @@ mf:entries ( <#test-bad-string-nq> <#test-bad-string-nt> + <#test-bad-string-trig> <#test-bad-string-ttl> <#test-bad-uri-nq> <#test-bad-uri-nt> <#test-bad-uri-ttl> + <#test-bad-uri-trig> <#test-bad-utf8-nq> <#test-bad-utf8-nt> <#test-bad-utf8-ttl> + <#test-bad-utf8-trig> <#test-lone-list> ) . @@ -36,6 +39,12 @@ mf:name "test-bad-string-ttl" ; mf:result <test-bad-string-out.nt> . +<#test-bad-string-trig> + a rdft:TestTrigNegativeSyntax ; + mf:action <test-bad-string.trig> ; + mf:name "test-bad-string-trig" ; + mf:result <test-bad-string-out.nt> . + <#test-bad-uri-nq> a rdft:TestNQuadsNegativeSyntax ; mf:action <test-bad-uri.nq> ; @@ -54,6 +63,12 @@ mf:name "test-bad-uri-ttl" ; mf:result <test-bad-uri-out.nt> . +<#test-bad-uri-trig> + a rdft:TestTurtleNegativeSyntax ; + mf:action <test-bad-uri.trig> ; + mf:name "test-bad-uri-trig" ; + mf:result <test-bad-uri-nq-out.nq> . + <#test-bad-utf8-nq> a rdft:TestNQuadsNegativeSyntax ; mf:action <test-bad-utf8.nq> ; @@ -72,6 +87,12 @@ mf:name "test-bad-utf8-ttl" ; mf:result <test-bad-utf8-ttl-out.nt> . +<#test-bad-utf8-trig> + a rdft:TestTurtleNegativeSyntax ; + mf:action <test-bad-utf8.trig> ; + mf:name "test-bad-utf8-trig" ; + mf:result <test-bad-utf8-ttl-out.nt> . + <#test-lone-list> a rdft:TestTurtleNegativeSyntax ; mf:action <test-lone-list.ttl> ; diff --git a/test/extra/lax/test-bad-string.trig b/test/extra/lax/test-bad-string.trig new file mode 100644 index 00000000..72eb9621 --- /dev/null +++ b/test/extra/lax/test-bad-string.trig @@ -0,0 +1,3 @@ +<http://example.org/s1> <http://example.org/p1> "Truncated line +<http://example.org/s1> <http://example.org/p1> "Bad escape \? " . +<http://example.org/s1> <http://example.org/p2> "Good" . diff --git a/test/extra/lax/test-bad-uri.trig b/test/extra/lax/test-bad-uri.trig new file mode 100644 index 00000000..ba852fef --- /dev/null +++ b/test/extra/lax/test-bad-uri.trig @@ -0,0 +1,8 @@ +<http://example.org/ÿÿbadg1> { + <http://example.org/s> <http://example.org/p> <http://example.org/goodo1> +} + +<http://example.org/s> + <http://example.org/p> <http://example.org/ bado1> ; + <http://example.org/p> <http://example.org/ÿÿbado2> ; + <http://example.org/p> <http://example.org/goodo2> . diff --git a/test/extra/lax/test-bad-utf8.trig b/test/extra/lax/test-bad-utf8.trig new file mode 100644 index 00000000..0e177366 --- /dev/null +++ b/test/extra/lax/test-bad-utf8.trig @@ -0,0 +1,6 @@ +<http://example.org/s> <http://example.org/p> "Impossible bytes: þ ÿ" . +<http://example.org/s> <http://example.org/p> "2 continuation bytes: €¿" . +<http://example.org/s> <http://example.org/p> "Missing continuation: À" . +<http://example.org/s> <http://example.org/p> """Impossible bytes: þ ÿ""" . +<http://example.org/s> <http://example.org/p> """2 continuation bytes: €¿""" . +<http://example.org/s> <http://example.org/p> """Missing continuation: À""" . |