summaryrefslogtreecommitdiff
path: root/apps/examples/bas/tests/test05.bas
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/bas/tests/test05.bas')
-rw-r--r--apps/examples/bas/tests/test05.bas31
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/examples/bas/tests/test05.bas b/apps/examples/bas/tests/test05.bas
new file mode 100644
index 000000000..28322325f
--- /dev/null
+++ b/apps/examples/bas/tests/test05.bas
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+echo -n $0: 'GOSUB RETURN subroutines... '
+
+cat >test5.bas <<eof
+10 gosub 100
+20 gosub 100
+30 end
+100 gosub 200
+110 gosub 200
+120 return
+200 print "hello, world":return
+eof
+
+cat >test5.ref <<eof
+hello, world
+hello, world
+hello, world
+hello, world
+eof
+
+sh ./test/runbas test5.bas >test5.data
+
+if cmp test5.ref test5.data
+then
+ rm -f test5.*
+ echo passed
+else
+ echo failed
+ exit 1
+fi