about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_multi_value_expr.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_multi_value_expr.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_multi_value_expr.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_multi_value_expr.txt b/js/scripting-lang/scratch_tests/test_multi_value_expr.txt
new file mode 100644
index 0000000..cbc3233
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_multi_value_expr.txt
@@ -0,0 +1,10 @@
+/* Test multi-value patterns with expressions */
+test_multi_expr : x y -> 
+  when (x % 2) (y % 2) is
+    0 0 then "both even"
+    0 1 then "x even, y odd"
+    1 0 then "x odd, y even"
+    1 1 then "both odd";
+
+result : test_multi_expr 4 6;
+..out result; 
\ No newline at end of file