summaryrefslogtreecommitdiff
path: root/apps/interpreters/bas/test/test09
blob: d751b247450d2bca887e53bd71373032544e462e (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
#!/bin/sh

echo -n $0: 'LOCAL variables... '

cat >test.bas <<eof
10 def fna(a)
20   local b
30   b=a+1
40 =b
60 b=3
70 print b
80 print fna(4)
90 print b
eof

cat >test.ref <<eof
 3 
 5 
 3 
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