aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jantuomi/borker/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com/jantuomi/borker/resources')
-rw-r--r--src/test/com/jantuomi/borker/resources/funcdef.bork8
-rw-r--r--src/test/com/jantuomi/borker/resources/program.bork13
-rw-r--r--src/test/com/jantuomi/borker/resources/test.file4
3 files changed, 25 insertions, 0 deletions
diff --git a/src/test/com/jantuomi/borker/resources/funcdef.bork b/src/test/com/jantuomi/borker/resources/funcdef.bork
new file mode 100644
index 0000000..8412129
--- /dev/null
+++ b/src/test/com/jantuomi/borker/resources/funcdef.bork
@@ -0,0 +1,8 @@
+/* kommentti juu jee */
+
+func my_func x y as
+ + x 1
+ - y x
+end
+
+my_func(1 2) \ No newline at end of file
diff --git a/src/test/com/jantuomi/borker/resources/program.bork b/src/test/com/jantuomi/borker/resources/program.bork
new file mode 100644
index 0000000..7034625
--- /dev/null
+++ b/src/test/com/jantuomi/borker/resources/program.bork
@@ -0,0 +1,13 @@
+/* get an integer from the user */
+decl lhs decl rhs
+set lhs in("give an integer: ")
+set rhs in("give another: ")
+
+/* add the inputs together */
+decl sum
+set sum + as_int(lhs) as_int(rhs)
+
+/* print the sum */
+out( concat(lhs " + " rhs " = " sum) )
+
+"done" \ No newline at end of file
diff --git a/src/test/com/jantuomi/borker/resources/test.file b/src/test/com/jantuomi/borker/resources/test.file
new file mode 100644
index 0000000..3b723c0
--- /dev/null
+++ b/src/test/com/jantuomi/borker/resources/test.file
@@ -0,0 +1,4 @@
+###
+This test file starts and
+ends in three # symbols
+### \ No newline at end of file