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

echo -n $0: 'Real to integer conversion... '

cat >test.bas <<'eof'
a%=1.2
print a%
a%=1.7
print a%
a%=-0.2
print a%
a%=-0.7
print a%
eof

cat >test.ref <<'eof'
 1 
 2 
 0 
-1 
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