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/test37.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/test37.bas')
-rw-r--r-- | apps/examples/bas/tests/test37.bas | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/examples/bas/tests/test37.bas b/apps/examples/bas/tests/test37.bas new file mode 100644 index 000000000..ca0d446eb --- /dev/null +++ b/apps/examples/bas/tests/test37.bas @@ -0,0 +1,24 @@ +#!/bin/sh + +echo -n $0: 'LINE INPUT reaching EOF... ' + +cat >test.bas <<'eof' +10 open "i",1,"test.ref" +20 while not eof(1) +30 line input #1,a$ +40 if a$="abc" then print a$; else print "def" +50 wend +eof + +awk 'BEGIN{ printf("abc") }' </dev/null >test.ref + +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 |