aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jantuomi/borker/resources
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2016-06-28 21:09:43 +0300
committerJan Tuomi <jans.tuomi@gmail.com>2016-07-26 19:47:12 +0300
commit8f84c00978dc05007873a9fe1de6a18511dc3cf8 (patch)
tree39fead540e22addee40b95b68db08cbea620745b /src/test/com/jantuomi/borker/resources
parent48dcd488054024d98fe1e659a4029630130d1d35 (diff)
Restructure project for use with maven
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