aboutsummaryrefslogtreecommitdiff
path: root/tests/if-else
diff options
context:
space:
mode:
Diffstat (limited to 'tests/if-else')
-rw-r--r--tests/if-else/buildfile5
-rw-r--r--tests/if-else/testscript18
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/if-else/buildfile b/tests/if-else/buildfile
new file mode 100644
index 0000000..9c791a4
--- /dev/null
+++ b/tests/if-else/buildfile
@@ -0,0 +1,5 @@
+# file : tests/if-else/buildfile
+# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+./: testscript $b
diff --git a/tests/if-else/testscript b/tests/if-else/testscript
new file mode 100644
index 0000000..afc0302
--- /dev/null
+++ b/tests/if-else/testscript
@@ -0,0 +1,18 @@
+# file : tests/if-else/testscript
+# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+# Test if-else.
+
+# @@ TODO: more test from old-tests/
+
+.include ../common.testscript
+
+: null
+:
+$* <<EOI 2>>EOE != 0
+if [null]
+ print t
+EOI
+<stdin>:1:4: error: invalid bool value: null
+EOE