diff options
Diffstat (limited to 'tests/test')
-rw-r--r-- | tests/test/script/runner/for.testscript | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/test/script/runner/for.testscript b/tests/test/script/runner/for.testscript new file mode 100644 index 0000000..21042e5 --- /dev/null +++ b/tests/test/script/runner/for.testscript @@ -0,0 +1,42 @@ +# File : tests/test/script/runner/for.testscript +# license : MIT; see accompanying LICENSE file + +.include ../common.testscript + +: form-1 +: +: for x: ... +: +{ + : basics + : + $c <<EOI && $b >>EOO + for x: a b + echo "$x" >| + end + EOI + a + b + EOO + + : test-options + : + $c <<EOI && $b >>~%EOO% + for test.options: -a -b + echo $* >| + end + EOI + %.+ -a% + %.+ -b% + EOO + + : special-var + : + $c <<EOI && $b 2>>EOE != 0 + for *: -a -b + echo $* >| + end + EOI + testscript:1:5: error: attempt to set '*' variable directly + EOE +} |