From 8f94d1b38df369c9316b499bf9434cf89c825098 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 9 Jun 2024 16:39:40 -0400 Subject: Add test cases for special characters in local names --- test/extra/bad/bad-prefix-dot.ttl | 1 + test/extra/bad/manifest.ttl | 8 +++++++- test/extra/good/manifest.ttl | 14 ++++++++++++++ test/extra/good/test-local-name-ends-with-dot.nt | 1 + test/extra/good/test-local-name-escapes.nt | 17 +++++++++++++++++ test/extra/good/test-local-name-escapes.ttl | 19 +++++++++++++++++++ 6 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 test/extra/bad/bad-prefix-dot.ttl create mode 100644 test/extra/good/test-local-name-ends-with-dot.nt create mode 100644 test/extra/good/test-local-name-escapes.nt create mode 100644 test/extra/good/test-local-name-escapes.ttl (limited to 'test/extra') diff --git a/test/extra/bad/bad-prefix-dot.ttl b/test/extra/bad/bad-prefix-dot.ttl new file mode 100644 index 00000000..7b02211f --- /dev/null +++ b/test/extra/bad/bad-prefix-dot.ttl @@ -0,0 +1 @@ +@prefix dotted.: . diff --git a/test/extra/bad/manifest.ttl b/test/extra/bad/manifest.ttl index 6b6df540..7e35e5ff 100644 --- a/test/extra/bad/manifest.ttl +++ b/test/extra/bad/manifest.ttl @@ -113,8 +113,9 @@ <#bad-object2> <#bad-paths> <#bad-pn-escape> - <#bad-prefix-missing-colon> <#bad-prefix> + <#bad-prefix-dot> + <#bad-prefix-missing-colon> <#bad-quote-in-uri> <#bad-semicolon-after-subject> <#bad-string> @@ -669,6 +670,11 @@ mf:action ; mf:name "bad-prefix" . +<#bad-prefix-dot> + a rdft:TestTurtleNegativeSyntax ; + mf:action ; + mf:name "bad-prefix-dot" . + <#bad-prefix-missing-colon> a rdft:TestTurtleNegativeSyntax ; mf:action ; diff --git a/test/extra/good/manifest.ttl b/test/extra/good/manifest.ttl index befe9451..3b911990 100644 --- a/test/extra/good/manifest.ttl +++ b/test/extra/good/manifest.ttl @@ -28,6 +28,8 @@ <#test-id> <#test-list-in-blank> <#test-list-subject> + <#test-local-name-ends-with-dot> + <#test-local-name-escapes> <#test-long-utf8> <#test-no-spaces> <#test-non-curie-uri> @@ -188,6 +190,18 @@ mf:name "test-list-subject" ; mf:result . +<#test-local-name-ends-with-dot> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "test-local-name-ends-with-dot" ; + mf:result . + +<#test-local-name-escapes> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "test-local-name-escapes" ; + mf:result . + <#test-long-utf8> a rdft:TestTurtleEval ; mf:action ; diff --git a/test/extra/good/test-local-name-ends-with-dot.nt b/test/extra/good/test-local-name-ends-with-dot.nt new file mode 100644 index 00000000..3285348a --- /dev/null +++ b/test/extra/good/test-local-name-ends-with-dot.nt @@ -0,0 +1 @@ + . diff --git a/test/extra/good/test-local-name-escapes.nt b/test/extra/good/test-local-name-escapes.nt new file mode 100644 index 00000000..a6362d7a --- /dev/null +++ b/test/extra/good/test-local-name-escapes.nt @@ -0,0 +1,17 @@ + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . diff --git a/test/extra/good/test-local-name-escapes.ttl b/test/extra/good/test-local-name-escapes.ttl new file mode 100644 index 00000000..8c5fce37 --- /dev/null +++ b/test/extra/good/test-local-name-escapes.ttl @@ -0,0 +1,19 @@ +@prefix eg: . + +eg:s eg:p eg:o\' . +eg:s eg:p eg:o\! . +eg:s eg:p eg:o\# . +eg:s eg:p eg:o\$ . +eg:s eg:p eg:o\% . +eg:s eg:p eg:o\& . +eg:s eg:p eg:o\( . +eg:s eg:p eg:o\) . +eg:s eg:p eg:o\* . +eg:s eg:p eg:o\+ . +eg:s eg:p eg:o\, . +eg:s eg:p eg:o\/ . +eg:s eg:p eg:o\; . +eg:s eg:p eg:o\= . +eg:s eg:p eg:o\? . +eg:s eg:p eg:o\@ . +eg:s eg:p eg:o\~ . -- cgit v1.2.1