about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_working_multiple.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_working_multiple.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_working_multiple.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_working_multiple.txt b/js/scripting-lang/scratch_tests/test_working_multiple.txt
new file mode 100644
index 0000000..66c796f
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_working_multiple.txt
@@ -0,0 +1,18 @@
+/* Test multiple values using working syntax */
+
+compare : x y -> 
+  when x y is
+    0 0 then "both zero"
+    0 _ then "x is zero"
+    _ 0 then "y is zero"
+    _ _ then "neither zero";
+
+test1 : compare 0 0;
+test2 : compare 0 5;
+test3 : compare 5 0;
+test4 : compare 5 5;
+
+..out test1;
+..out test2;
+..out test3;
+..out test4; 
\ No newline at end of file