aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/status.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-04 10:51:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-08 16:12:59 +0300
commit278140ebf2bc97eb72a1e8adb04a40a0a5807d8f (patch)
treebf6ea4e55c98b0543bb51c6eb46f48e29b58aecb /tests/test/script/runner/status.test
parent6e1f59670b7aaabb27830a345aad9532af111016 (diff)
Add mkdir and touch builtins
Diffstat (limited to 'tests/test/script/runner/status.test')
-rw-r--r--tests/test/script/runner/status.test45
1 files changed, 40 insertions, 5 deletions
diff --git a/tests/test/script/runner/status.test b/tests/test/script/runner/status.test
index 0ef1ee9..f1ad5bf 100644
--- a/tests/test/script/runner/status.test
+++ b/tests/test/script/runner/status.test
@@ -2,8 +2,43 @@
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-$* # status-def @@ status- is already in file name
-$* == 0 # status-eq-0
-$* -s 1 != 0 # status-ne-0
-$* -s 1 == 1 # status-eq-1
-$* != 1 # status-ne-1
++mkdir build
++cat <<EOI >>>build/boostrap.build
+project = test
+amalgamation =
+
+using test
+EOI
+
+b = $build.driver -q --no-column --buildfile - <"./: test{testscript}" \
+ &?test/*** test
+c = cat >>>testscript
+test = \'$test\'
+
+# Successfull tests.
+#
+: eq-true
+:
+$c <"$* == 0";
+$b
+
+: ne-true
+:
+$c <"$* -s 1 != 0";
+$b
+
+# Faulty tests.
+#
+: eq-false
+:
+$c <"$* -s 1 == 0";
+$b 2>>EOE != 0
+testscript:1: error: ../../../driver$ext exit status 1 != 0
+EOE
+
+: ne-false
+:
+$c <"$* -s 1 != 1";
+$b 2>>EOE != 0
+testscript:1: error: ../../../driver$ext exit status 1 == 1
+EOE