summaryrefslogtreecommitdiff
path: root/apps/examples/bas/tests/test44.bas
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/bas/tests/test44.bas')
-rw-r--r--apps/examples/bas/tests/test44.bas38
1 files changed, 38 insertions, 0 deletions
diff --git a/apps/examples/bas/tests/test44.bas b/apps/examples/bas/tests/test44.bas
new file mode 100644
index 000000000..25b1ec3de
--- /dev/null
+++ b/apps/examples/bas/tests/test44.bas
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+echo -n $0: 'DELETE... '
+
+cat >test.bas <<eof
+10 print 10
+20 print 20
+30 print 30
+40 print 40
+50 print 50
+60 print 60
+70 print 70
+eof
+
+cat >test.input <<eof
+load "test.bas"
+delete -20
+delete 60-
+delete 30-40
+delete 15
+list
+eof
+
+cat >test.ref <<eof
+Error: No such line at: 15
+50 print 50
+eof
+
+sh ./test/runbas <test.input >test.data
+
+if cmp test.ref test.data
+then
+ rm -f test.*
+ echo passed
+else
+ echo failed
+ exit 1
+fi