aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/if.test
blob: d9c36011af389b6b03612c8fe3c7d5b07264006b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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