diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-22 22:37:40 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-24 21:37:58 +0300 |
commit | 72945d9c8eee18aed1550c3f42dc41e6a8a0f029 (patch) | |
tree | 9fdfe1c3bf48d0e303dc435c40116dacf48286b3 /tests/test/script/runner | |
parent | 83bb02cada0b894d9134cc5489999e0f0fe8bd7c (diff) |
Use CLI-generated classes to parse testscript builtin options
Diffstat (limited to 'tests/test/script/runner')
-rw-r--r-- | tests/test/script/runner/exit.testscript | 2 | ||||
-rw-r--r-- | tests/test/script/runner/set.testscript | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/tests/test/script/runner/exit.testscript b/tests/test/script/runner/exit.testscript index 261b02d..b461155 100644 --- a/tests/test/script/runner/exit.testscript +++ b/tests/test/script/runner/exit.testscript @@ -96,7 +96,7 @@ empty_id = '' : Note that we also test that cleanups are executed. : $c <<EOI && $b >>EOO - touch -f a; + touch a; echo foo >| && exit && echo bar >|; echo baz >| echo box >| diff --git a/tests/test/script/runner/set.testscript b/tests/test/script/runner/set.testscript index 28d6686..edbff3e 100644 --- a/tests/test/script/runner/set.testscript +++ b/tests/test/script/runner/set.testscript @@ -40,6 +40,24 @@ EOE } +: options +: +{ + : unknown + : + $c <'set -u' && $b 2>>EOE != 0 + testscript:1:1: error: set: unknown option '-u' + info: test id: 1 + EOE + + : both-newline-whitespace + : + $c <'set -nw' && $b 2>>EOE != 0 + testscript:1:1: error: both -n|--newline and -w|--whitespace specified + info: test id: 1 + EOE +} + : arguments : { |