about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_simple_when_equals.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_simple_when_equals.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_simple_when_equals.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_simple_when_equals.txt b/js/scripting-lang/scratch_tests/test_simple_when_equals.txt
new file mode 100644
index 0000000..885091b
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_simple_when_equals.txt
@@ -0,0 +1,17 @@
+/* Simple test for when expressions with equals */
+
+/* Test basic when with equals */
+test1 : when 5 = 5 is
+  true then "equal"
+  _ then "not equal";
+
+..out test1;
+
+/* Test multiple values with different patterns */
+test2 : when 5 = 5 3 = 3 is
+  1 1 then "both equal"
+  1 0 then "first equal"
+  0 1 then "second equal"
+  0 0 then "neither equal";
+
+..out test2; 
\ No newline at end of file