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

echo -n $0: 'MAT INPUT... '

cat >test.bas <<'eof'
dim a(2,2)
mat input a
mat print a
mat input a
mat print a
eof

cat >test.input <<'eof'
1,2,3,4,5
1
3,4
eof

cat >test.ref <<'eof'
? 
 1             2            
 3             4            
? ? 
 1             0            
 3             4            
eof

sh ./test/runbas test.bas <test.input >test.data

if cmp test.ref test.data
then
  rm -f test.*
  echo passed
else
  echo failed
  exit 1
fi