about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_table_function.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_table_function.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_table_function.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_table_function.txt b/js/scripting-lang/scratch_tests/test_table_function.txt
new file mode 100644
index 0000000..8e019b8
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_table_function.txt
@@ -0,0 +1,11 @@
+/* Test function in table */
+
+// Just create a table with a function
+table : {
+    func: x -> x
+};
+
+// Test it
+..out "=== TABLE FUNCTION TEST ===";
+result : table.func 5;
+..out result; 
\ No newline at end of file