about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_current_tables.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_current_tables.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_current_tables.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_current_tables.txt b/js/scripting-lang/scratch_tests/test_current_tables.txt
new file mode 100644
index 0000000..e3a64a5
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_current_tables.txt
@@ -0,0 +1,33 @@
+/* Test current table behavior before implementing enhancements */
+
+/* Basic table creation */
+numbers : {1, 2, 3, 4, 5};
+person : {name: "Alice", age: 30, active: true};
+
+/* Test current map behavior */
+double : x -> x * 2;
+doubled : map @double numbers;
+/* Expected: 10 (applies to last value only) */
+
+/* Test current filter behavior */
+isEven : x -> x % 2 == 0;
+even_result : filter @isEven numbers;
+/* Expected: 0 (filter returns 0 for false) */
+
+/* Test current reduce behavior */
+sum : x y -> x + y;
+total : reduce @sum 0 numbers;
+/* Expected: 5 (reduces with last value only) */
+
+/* Output results */
+..out "Current table behavior:";
+..out "Numbers:";
+..out numbers;
+..out "Person:";
+..out person;
+..out "Map result:";
+..out doubled;
+..out "Filter result:";
+..out even_result;
+..out "Reduce result:";
+..out total; 
\ No newline at end of file