blob: 0419284d8ba9a2c378a1ff015e1f669fc27606fa (
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: 'OPTION BASE... '
cat >test.bas <<'eof'
option base 3
dim a(3,5)
a(3,3)=1
a(3,5)=2
print a(3,3)
print a(3,5)
option base -2
dim b(-1,2)
b(-2,-2)=10
b(-1,2)=20
print a(3,3)
print a(3,5)
print b(-2,-2)
print b(-1,2)
eof
cat >test.ref <<'eof'
1
2
1
2
10
20
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
|