diff options
Diffstat (limited to 'tests/test/script/runner/if.testscript')
-rw-r--r-- | tests/test/script/runner/if.testscript | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test/script/runner/if.testscript b/tests/test/script/runner/if.testscript new file mode 100644 index 0000000..a625c34 --- /dev/null +++ b/tests/test/script/runner/if.testscript @@ -0,0 +1,25 @@ +# file : tests/test/script/runner/if.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include ../common.testscript + +: if-branch +: +$c <<EOI && $b >'if' +if cat <'foo' >'foo' + echo 'if' >| +else + echo 'else' >| +end +EOI + +: else-branch +: +$c <<EOI && $b >'else' +if cat <'foo' >'bar' + echo 'if' >| +else + echo 'else' >| +end +EOI |