#!/bin/sh

echo -n $0: 'DEFSTR... '

cat >test.bas <<'eof'
defstr str
str="jon"
a$="Welcome "+str+", to the nut house!"
print a$
mid$(str,1,1)="w"
a$="Welcome "+str+", to the nut house!"
print a$
eof

cat >test.ref <<'eof'
Welcome jon, to the nut house!
Welcome won, to the nut house!
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
