diff options
Diffstat (limited to 'apps/examples/bas/tests/test32.bas')
-rw-r--r-- | apps/examples/bas/tests/test32.bas | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/examples/bas/tests/test32.bas b/apps/examples/bas/tests/test32.bas new file mode 100644 index 000000000..d080d3c27 --- /dev/null +++ b/apps/examples/bas/tests/test32.bas @@ -0,0 +1,28 @@ +#!/bin/sh + +echo -n $0: 'SUB routines... ' + +cat >test.bas <<'eof' +PUTS("abc") +END + +SUB PUTS(s$) + FOR i=1 to LEN(s$) : print mid$(s$,i,1); : NEXT + PRINT +END SUB +eof + +cat >test.ref <<'eof' +abc +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 |