summaryrefslogtreecommitdiff
path: root/apps/examples/bas/tests/test37.bas
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/bas/tests/test37.bas')
-rw-r--r--apps/examples/bas/tests/test37.bas24
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/examples/bas/tests/test37.bas b/apps/examples/bas/tests/test37.bas
new file mode 100644
index 000000000..ca0d446eb
--- /dev/null
+++ b/apps/examples/bas/tests/test37.bas
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+echo -n $0: 'LINE INPUT reaching EOF... '
+
+cat >test.bas <<'eof'
+10 open "i",1,"test.ref"
+20 while not eof(1)
+30 line input #1,a$
+40 if a$="abc" then print a$; else print "def"
+50 wend
+eof
+
+awk 'BEGIN{ printf("abc") }' </dev/null >test.ref
+
+sh ./test/runbas test.bas >test.data
+
+if cmp test.ref test.data
+then
+ rm -f test.*
+ echo passed
+else
+ echo failed
+ exit 1
+fi