From 5e4538756d601e6a941c5290777af95ea8848e1a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 22 Jul 2021 15:26:22 -0400 Subject: [WIP] Preserve long or short quoting from input documents --- test/extra/good/manifest.ttl | 35 ++++++++++++++++++++++++++ test/extra/good/test-escapes.nt | 2 ++ test/extra/good/test-escapes.ttl | 4 +++ test/extra/good/test-long-backspace-escape.nt | 1 + test/extra/good/test-long-backspace-escape.ttl | 4 +++ test/extra/good/test-long-delete-escape.nt | 1 + test/extra/good/test-long-delete-escape.ttl | 4 +++ test/extra/good/test-long-form-feed-escape.nt | 1 + test/extra/good/test-long-form-feed-escape.ttl | 4 +++ test/extra/good/test-long-whitespace.nt | 2 ++ test/extra/good/test-long-whitespace.ttl | 11 ++++++++ test/extra/perfect/manifest.ttl | 14 ----------- test/extra/perfect/test-backspace-escape.nt | 1 - test/extra/perfect/test-backspace-escape.ttl | 5 +--- test/extra/perfect/test-delete-escape.nt | 1 - test/extra/perfect/test-delete-escape.ttl | 3 --- test/extra/perfect/test-escapes.nt | 2 -- test/extra/perfect/test-escapes.ttl | 4 --- test/extra/perfect/test-form-feed-escape.nt | 1 - test/extra/perfect/test-form-feed-escape.ttl | 5 +--- test/extra/perfect/test-long-whitespace.nt | 2 -- test/extra/perfect/test-long-whitespace.ttl | 11 -------- 22 files changed, 71 insertions(+), 47 deletions(-) create mode 100644 test/extra/good/test-escapes.nt create mode 100644 test/extra/good/test-escapes.ttl create mode 100644 test/extra/good/test-long-backspace-escape.nt create mode 100644 test/extra/good/test-long-backspace-escape.ttl create mode 100644 test/extra/good/test-long-delete-escape.nt create mode 100644 test/extra/good/test-long-delete-escape.ttl create mode 100644 test/extra/good/test-long-form-feed-escape.nt create mode 100644 test/extra/good/test-long-form-feed-escape.ttl create mode 100644 test/extra/good/test-long-whitespace.nt create mode 100644 test/extra/good/test-long-whitespace.ttl delete mode 100644 test/extra/perfect/test-escapes.nt delete mode 100644 test/extra/perfect/test-escapes.ttl delete mode 100644 test/extra/perfect/test-long-whitespace.nt delete mode 100644 test/extra/perfect/test-long-whitespace.ttl (limited to 'test/extra') diff --git a/test/extra/good/manifest.ttl b/test/extra/good/manifest.ttl index bce7c564..7c356285 100644 --- a/test/extra/good/manifest.ttl +++ b/test/extra/good/manifest.ttl @@ -23,10 +23,15 @@ <#test-double> <#test-empty-path-base> <#test-eof-at-page-end> + <#test-escapes> <#test-id> <#test-list-in-blank> <#test-list-subject> + <#test-long-backspace-escape> + <#test-long-delete-escape> + <#test-long-form-feed-escape> <#test-long-utf8> + <#test-long-whitespace> <#test-no-spaces> <#test-non-curie-uri> <#test-prefix> @@ -140,6 +145,12 @@ mf:name "test-eof-at-page-end" ; mf:result . +<#test-escapes> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "test-escapes" ; + mf:result . + <#test-id> a rdft:TestTurtleEval ; mf:action ; @@ -158,12 +169,36 @@ mf:name "test-list-subject" ; mf:result . +<#test-long-backspace-escape> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "test-long-backspace-escape" ; + mf:result . + +<#test-long-delete-escape> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "test-long-delete-escape" ; + mf:result . + +<#test-long-form-feed-escape> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "test-long-form-feed-escape" ; + mf:result . + <#test-long-utf8> a rdft:TestTurtleEval ; mf:action ; mf:name "test-long-utf8" ; mf:result . +<#test-long-whitespace> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "test-long-whitespace" ; + mf:result . + <#test-no-spaces> a rdft:TestTurtleEval ; mf:action ; diff --git a/test/extra/good/test-escapes.nt b/test/extra/good/test-escapes.nt new file mode 100644 index 00000000..2780d976 --- /dev/null +++ b/test/extra/good/test-escapes.nt @@ -0,0 +1,2 @@ + "\\\r\n\t" . + . diff --git a/test/extra/good/test-escapes.ttl b/test/extra/good/test-escapes.ttl new file mode 100644 index 00000000..b8fcce7a --- /dev/null +++ b/test/extra/good/test-escapes.ttl @@ -0,0 +1,4 @@ + + """\\ + """ , + . diff --git a/test/extra/good/test-long-backspace-escape.nt b/test/extra/good/test-long-backspace-escape.nt new file mode 100644 index 00000000..74e8e277 --- /dev/null +++ b/test/extra/good/test-long-backspace-escape.nt @@ -0,0 +1 @@ + "long\n\u0008\n" . diff --git a/test/extra/good/test-long-backspace-escape.ttl b/test/extra/good/test-long-backspace-escape.ttl new file mode 100644 index 00000000..c4b604cb --- /dev/null +++ b/test/extra/good/test-long-backspace-escape.ttl @@ -0,0 +1,4 @@ + + """long +\b +""" . diff --git a/test/extra/good/test-long-delete-escape.nt b/test/extra/good/test-long-delete-escape.nt new file mode 100644 index 00000000..25ed9ab3 --- /dev/null +++ b/test/extra/good/test-long-delete-escape.nt @@ -0,0 +1 @@ + "long\n\u007F\n" . diff --git a/test/extra/good/test-long-delete-escape.ttl b/test/extra/good/test-long-delete-escape.ttl new file mode 100644 index 00000000..11bc2b21 --- /dev/null +++ b/test/extra/good/test-long-delete-escape.ttl @@ -0,0 +1,4 @@ + + """long +\u007F +""" . diff --git a/test/extra/good/test-long-form-feed-escape.nt b/test/extra/good/test-long-form-feed-escape.nt new file mode 100644 index 00000000..d16c6da9 --- /dev/null +++ b/test/extra/good/test-long-form-feed-escape.nt @@ -0,0 +1 @@ + "long\n\u000C\n" . diff --git a/test/extra/good/test-long-form-feed-escape.ttl b/test/extra/good/test-long-form-feed-escape.ttl new file mode 100644 index 00000000..f62ec19e --- /dev/null +++ b/test/extra/good/test-long-form-feed-escape.ttl @@ -0,0 +1,4 @@ + + """long + +""" . diff --git a/test/extra/good/test-long-whitespace.nt b/test/extra/good/test-long-whitespace.nt new file mode 100644 index 00000000..09664b37 --- /dev/null +++ b/test/extra/good/test-long-whitespace.nt @@ -0,0 +1,2 @@ + "\nthis \ris a \U00015678long\t\nliteral\uABCD\n" . + "\tThis \uABCDis\r \U00015678another\n\none\n" . diff --git a/test/extra/good/test-long-whitespace.ttl b/test/extra/good/test-long-whitespace.ttl new file mode 100644 index 00000000..9c3f946c --- /dev/null +++ b/test/extra/good/test-long-whitespace.ttl @@ -0,0 +1,11 @@ + + """ +this is a 𕙸long +literalꯍ +""" . + + + """ This ꯍis 𕙸another + +one +""" . diff --git a/test/extra/perfect/manifest.ttl b/test/extra/perfect/manifest.ttl index 572f55f2..66dd7547 100644 --- a/test/extra/perfect/manifest.ttl +++ b/test/extra/perfect/manifest.ttl @@ -10,13 +10,11 @@ <#test-decimal> <#test-delete-escape> <#test-empty> - <#test-escapes> <#test-exact-uri> <#test-form-feed-escape> <#test-integer> <#test-lang> <#test-list> - <#test-long-whitespace> <#test-triple> <#test-uri-escape> <#test-uri-query> @@ -48,12 +46,6 @@ mf:name "test-empty" ; mf:result . -<#test-escapes> - a rdft:TestTurtleEval ; - mf:action ; - mf:name "test-escapes" ; - mf:result . - <#test-exact-uri> a rdft:TestTurtleEval ; mf:action ; @@ -84,12 +76,6 @@ mf:name "test-list" ; mf:result . -<#test-long-whitespace> - a rdft:TestTurtleEval ; - mf:action ; - mf:name "test-long-whitespace" ; - mf:result . - <#test-triple> a rdft:TestTurtleEval ; mf:action ; diff --git a/test/extra/perfect/test-backspace-escape.nt b/test/extra/perfect/test-backspace-escape.nt index dd1fda93..f0b894a2 100644 --- a/test/extra/perfect/test-backspace-escape.nt +++ b/test/extra/perfect/test-backspace-escape.nt @@ -1,3 +1,2 @@ "\u0008 first" . "last \u0008" . - "long\n\u0008\n" . diff --git a/test/extra/perfect/test-backspace-escape.ttl b/test/extra/perfect/test-backspace-escape.ttl index a92a9252..ab9c8314 100644 --- a/test/extra/perfect/test-backspace-escape.ttl +++ b/test/extra/perfect/test-backspace-escape.ttl @@ -1,6 +1,3 @@ "\b first" , - "last \b" , - """long -\b -""" . + "last \b" . diff --git a/test/extra/perfect/test-delete-escape.nt b/test/extra/perfect/test-delete-escape.nt index 1fd30590..f3d92525 100644 --- a/test/extra/perfect/test-delete-escape.nt +++ b/test/extra/perfect/test-delete-escape.nt @@ -1,3 +1,2 @@ "last \u007F" . - "long\n\u007F\n" . "\u007F first" . diff --git a/test/extra/perfect/test-delete-escape.ttl b/test/extra/perfect/test-delete-escape.ttl index a2711920..019fc47a 100644 --- a/test/extra/perfect/test-delete-escape.ttl +++ b/test/extra/perfect/test-delete-escape.ttl @@ -1,6 +1,3 @@ "last \u007F" , - """long -\u007F -""" , "\u007F first" . diff --git a/test/extra/perfect/test-escapes.nt b/test/extra/perfect/test-escapes.nt deleted file mode 100644 index 2780d976..00000000 --- a/test/extra/perfect/test-escapes.nt +++ /dev/null @@ -1,2 +0,0 @@ - "\\\r\n\t" . - . diff --git a/test/extra/perfect/test-escapes.ttl b/test/extra/perfect/test-escapes.ttl deleted file mode 100644 index b8fcce7a..00000000 --- a/test/extra/perfect/test-escapes.ttl +++ /dev/null @@ -1,4 +0,0 @@ - - """\\ - """ , - . diff --git a/test/extra/perfect/test-form-feed-escape.nt b/test/extra/perfect/test-form-feed-escape.nt index 7848ec5b..6606fb07 100644 --- a/test/extra/perfect/test-form-feed-escape.nt +++ b/test/extra/perfect/test-form-feed-escape.nt @@ -1,3 +1,2 @@ "\u000C first" . "last \u000C" . - "long\n\u000C\n" . diff --git a/test/extra/perfect/test-form-feed-escape.ttl b/test/extra/perfect/test-form-feed-escape.ttl index 73c78a5e..0b38971e 100644 --- a/test/extra/perfect/test-form-feed-escape.ttl +++ b/test/extra/perfect/test-form-feed-escape.ttl @@ -1,6 +1,3 @@ "\f first" , - "last \f" , - """long - -""" . + "last \f" . diff --git a/test/extra/perfect/test-long-whitespace.nt b/test/extra/perfect/test-long-whitespace.nt deleted file mode 100644 index fca880d1..00000000 --- a/test/extra/perfect/test-long-whitespace.nt +++ /dev/null @@ -1,2 +0,0 @@ - "\nthis \ris a 𕙸long\t\nliteralꯍ\n" . - "\tThis ꯍis\r 𕙸another\n\none\n" . diff --git a/test/extra/perfect/test-long-whitespace.ttl b/test/extra/perfect/test-long-whitespace.ttl deleted file mode 100644 index 9c3f946c..00000000 --- a/test/extra/perfect/test-long-whitespace.ttl +++ /dev/null @@ -1,11 +0,0 @@ - - """ -this is a 𕙸long -literalꯍ -""" . - - - """ This ꯍis 𕙸another - -one -""" . -- cgit v1.2.1