blob: 2ad4d8ec10f5be25fd01780d63ef68c20405c4a0 (
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
35
36
37
38
39
40
41
42
43
|
#!/bin/sh
echo -n $0: 'DO WHILE, LOOP... '
cat >test.bas <<'eof'
print "loop started"
x$=""
do while len(x$)<3
print "x$ is ";x$
x$=x$+"a"
y$=""
do while len(y$)<2
print "y$ is ";y$
y$=y$+"b"
loop
loop
print "loop ended"
eof
cat >test.ref <<'eof'
loop started
x$ is
y$ is
y$ is b
x$ is a
y$ is
y$ is b
x$ is aa
y$ is
y$ is b
loop ended
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
|