summaryrefslogtreecommitdiff
path: root/apps/interpreters/bas/test/test11
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-27 07:53:12 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-27 07:53:12 -0600
commit4ef5633f361ab5302007045dcef945043d6d6225 (patch)
tree1806fe0ec9221c4e6c7439419e8b57bfe7865d29 /apps/interpreters/bas/test/test11
parentf2fe892334074612e4e3159c754b65d13bc348fc (diff)
downloadpx4-nuttx-4ef5633f361ab5302007045dcef945043d6d6225.tar.gz
px4-nuttx-4ef5633f361ab5302007045dcef945043d6d6225.tar.bz2
px4-nuttx-4ef5633f361ab5302007045dcef945043d6d6225.zip
Port of BAS 2.4 to NuttX by Alan Carvalho de Assis
Diffstat (limited to 'apps/interpreters/bas/test/test11')
-rw-r--r--apps/interpreters/bas/test/test1130
1 files changed, 30 insertions, 0 deletions
diff --git a/apps/interpreters/bas/test/test11 b/apps/interpreters/bas/test/test11
new file mode 100644
index 000000000..88801c730
--- /dev/null
+++ b/apps/interpreters/bas/test/test11
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+echo -n $0: 'OPEN and LINE INPUT... '
+
+cat >test.bas <<'eof'
+10 open "i",1,"test.bas"
+20 while not eof(1)
+30 line input #1,a$
+40 print a$
+50 wend
+eof
+
+cat >test.ref <<eof
+10 open "i",1,"test.bas"
+20 while not eof(1)
+30 line input #1,a$
+40 print a$
+50 wend
+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