summaryrefslogtreecommitdiff
path: root/apps/interpreters/bas/test/test37
blob: ca0d446eb72df300dc6857a8e30a155a49f8fb33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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