#!/bin/sh

echo -n $0: '#! preservation... '

cat >test.bas <<eof
#!/bin/env bas
10 print "hi"
eof

cat >test.ref <<eof
#!/bin/env bas
10 print "hi"
eof

sh ./test/runbas <<'eof'
load "test.bas"
save "test.data"
eof

if cmp test.ref test.data
then
  rm -f test.*
  echo passed
else
  echo failed
  exit 1
fi
