summaryrefslogtreecommitdiff
path: root/apps/examples/bas/tests/test04.bas
blob: 547f4ec283ed0898eb72753e0127ca3534dac74f (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
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

echo -n $0: 'REPEAT UNTIL loop... '

cat >test.bas <<eof
10 a=1
20 repeat 
30   print a
40   a=a+1
50 until a=10
eof

cat >test.ref <<eof
 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
eof

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