blob: 9f0a471f4c9000010b41e0e313461befd9487a8c (
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
44
45
|
#!/bin/sh
echo -n $0: 'ELSEIF... '
cat >test.bas <<'eof'
for x=1 to 3
if x=1 then
print "1a"
else
if x=2 then
print "2a"
else
print "3a"
end if
end if
next
for x=1 to 3
if x=1 then
print "1b"
elseif x=2 then
print "2b"
elseif x=3 then print "3b"
next
eof
cat >test.ref <<'eof'
1a
2a
3a
1b
2b
3b
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
|