From ecf1f7340a9718199a8e965ffc2f738c7d87f055 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 7 Jun 2024 02:11:40 -0400 Subject: Add test cases for lax TriG parsing --- test/extra/lax/manifest.ttl | 21 +++++++++++++++++++++ test/extra/lax/test-bad-string.trig | 3 +++ test/extra/lax/test-bad-uri.trig | 8 ++++++++ test/extra/lax/test-bad-utf8.trig | 6 ++++++ 4 files changed, 38 insertions(+) create mode 100644 test/extra/lax/test-bad-string.trig create mode 100644 test/extra/lax/test-bad-uri.trig create mode 100644 test/extra/lax/test-bad-utf8.trig (limited to 'test') 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-trig> + a rdft:TestTrigNegativeSyntax ; + mf:action ; + mf:name "test-bad-string-trig" ; + mf:result . + <#test-bad-uri-nq> a rdft:TestNQuadsNegativeSyntax ; mf:action ; @@ -54,6 +63,12 @@ mf:name "test-bad-uri-ttl" ; mf:result . +<#test-bad-uri-trig> + a rdft:TestTurtleNegativeSyntax ; + mf:action ; + mf:name "test-bad-uri-trig" ; + mf:result . + <#test-bad-utf8-nq> a rdft:TestNQuadsNegativeSyntax ; mf:action ; @@ -72,6 +87,12 @@ mf:name "test-bad-utf8-ttl" ; mf:result . +<#test-bad-utf8-trig> + a rdft:TestTurtleNegativeSyntax ; + mf:action ; + mf:name "test-bad-utf8-trig" ; + mf:result . + <#test-lone-list> a rdft:TestTurtleNegativeSyntax ; mf:action ; 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 @@ + "Truncated line + "Bad escape \? " . + "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 @@ + { + +} + + + ; + ; + . 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 @@ + "Impossible bytes: þ ÿ" . + "2 continuation bytes: €¿" . + "Missing continuation: À" . + """Impossible bytes: þ ÿ""" . + """2 continuation bytes: €¿""" . + """Missing continuation: À""" . -- cgit v1.2.1