summaryrefslogtreecommitdiff
path: root/apps/examples/bas/tests/test02.bas
blob: 88615fa61f2eba1d67694668269c3264fe7b7821 (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
#!/bin/sh

echo -n $0: 'Array variable assignment... '

cat >test.bas <<eof
10 dim a(1)
20 a(0)=10
30 a(1)=11
40 a=12
50 print a(0)
60 print a(1)
70 print a
eof

cat >test.ref <<eof
 10 
 11 
 12 
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