Made the slurp unit test more robust.
This commit is contained in:
parent
3618368f63
commit
10098a83bf
|
@ -1,11 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
expected='"Hello, this is used by `slurp.sh` test, please do not remove.'
|
||||
actual=`echo '(slurp (open "hi"))' | target/psse | tail -2 | head -1`
|
||||
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'"
|
||||
|
|
Loading…
Reference in a new issue