aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/if.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-01-27 02:32:55 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-31 15:54:33 +0300
commit749f748ae6ded6e229214d2dddf3c45482bffbd3 (patch)
treec504c8b225db01c8c152b3772467d16c036a42fc /tests/test/script/runner/if.test
parente61a287832532124a1a90a8bb9cc0f61f3a4db92 (diff)
Add support for test command pipe, expression and command-if
Diffstat (limited to 'tests/test/script/runner/if.test')
-rw-r--r--tests/test/script/runner/if.test25
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