diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-07 14:02:53 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-07 14:02:53 -0600 |
commit | 20c645e1cdf2456d09e3c85d2b21e4c32b88b83e (patch) | |
tree | c6832ac6658ee21dfd732cada7a06196f13fcd0f /apps/examples/bas/tests/test47.bas | |
parent | 7711da2981698ff86c0b7a4b49bbc44f0f26a834 (diff) | |
download | nuttx-20c645e1cdf2456d09e3c85d2b21e4c32b88b83e.tar.gz nuttx-20c645e1cdf2456d09e3c85d2b21e4c32b88b83e.tar.bz2 nuttx-20c645e1cdf2456d09e3c85d2b21e4c32b88b83e.zip |
BAS: Move test files from apps/interpreter/bas to apps/examples/bas
Diffstat (limited to 'apps/examples/bas/tests/test47.bas')
-rw-r--r-- | apps/examples/bas/tests/test47.bas | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/apps/examples/bas/tests/test47.bas b/apps/examples/bas/tests/test47.bas new file mode 100644 index 000000000..13eb94db2 --- /dev/null +++ b/apps/examples/bas/tests/test47.bas @@ -0,0 +1,36 @@ +#!/bin/sh + +echo -n $0: 'MAT WRITE... ' + +cat >test.bas <<'eof' +dim a(3,4) +for i=0 to 3 + for j=0 to 4 + a(i,j)=i*10+j + print a(i,j); + next + print +next +mat write a +eof + +cat >test.ref <<'eof' + 0 1 2 3 4 + 10 11 12 13 14 + 20 21 22 23 24 + 30 31 32 33 34 +11,12,13,14 +21,22,23,24 +31,32,33,34 +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 |