post-scarcity/unit-tests/slurp.sh
Simon Brooke f36436a9e1 #8: Done
I'm now of the opinion that this is done at the wrong level in the stack and needs to be redone later; but it works for now.

There's a regression in `open`, but I can't see why.
2019-02-07 09:22:44 +00:00

17 lines
307 B
Bash
Executable file

#!/bin/bash
tmp=hi.$$
echo "Hello, there." > ${tmp}
expected='"Hello, there.'
actual=`echo "(slurp (open \"${tmp}\"))" | target/psse | tail -2 | head -1`
if [ "${expected}" = "${actual}" ]
then
echo "OK"
rm ${tmp}
exit 0
else
echo "Fail: expected '$expected', got '$actual'"
exit 1
fi