about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_available_functions.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_available_functions.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_available_functions.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_available_functions.txt b/js/scripting-lang/scratch_tests/test_available_functions.txt
new file mode 100644
index 0000000..0274711
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_available_functions.txt
@@ -0,0 +1,26 @@
+/* Test to see what functions are available */
+
+/* Test basic arithmetic */
+result1 : 5 + 3;
+..out "5 + 3:";
+..out result1;
+
+/* Test basic comparison */
+result2 : 5 = 3;
+..out "5 = 3:";
+..out result2;
+
+result3 : 5 = 5;
+..out "5 = 5:";
+..out result3;
+
+/* Test function definition */
+double : x -> x * 2;
+result4 : double 5;
+..out "double 5:";
+..out result4;
+
+/* Test table creation */
+table : {1, 2, 3};
+..out "table:";
+..out table; 
\ No newline at end of file