diff options
Diffstat (limited to 'tests/test/script/runner/if.test')
-rw-r--r-- | tests/test/script/runner/if.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test/script/runner/if.test b/tests/test/script/runner/if.test new file mode 100644 index 0000000..d9c3601 --- /dev/null +++ b/tests/test/script/runner/if.test @@ -0,0 +1,25 @@ +# file : tests/test/script/runner/if.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include ../common.test + +: 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 |