diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-20 17:31:26 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-20 21:08:32 +0300 |
commit | 5661b404b0104c3065a40ad622bdd3c11d748a99 (patch) | |
tree | b1e1d7aefa9fda7214fa0fcce92cf1b85f87fc76 /tests/string-parser/testscript | |
parent | 972f89d5a1d0c094241eb6ce1b8f499e3fcf151b (diff) |
Implement string_parser
Diffstat (limited to 'tests/string-parser/testscript')
-rw-r--r-- | tests/string-parser/testscript | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/string-parser/testscript b/tests/string-parser/testscript new file mode 100644 index 0000000..83c8346 --- /dev/null +++ b/tests/string-parser/testscript @@ -0,0 +1,42 @@ +# file : tests/string-parser/testscript +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +: valid +: +{ + test.options += -l + sp=' ' # For line-terminating spaces. + + : quoted + : + { + $* -p <<"EOI" >>EOO + abc "d 'ef " 'x "y z'$sp + EOI + 0:abc + 5:"d 'ef " + 14:'x "y z' + EOO + } + + : unquoted + : + { + $* -u <<"EOI" >>"EOO" + abc "d 'ef " 'x "y z'$sp + EOI + abc + d 'ef$sp + x "y z + EOO + } +} + +: invalid +: +{ + : unterm-quoting + : + $* <'ab"c' 2>'4: unterminated quoted string' == 1 +} |