Made the slurp unit test more robust.
This commit is contained in:
parent
3618368f63
commit
10098a83bf
|
@ -1,11 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
expected='"Hello, this is used by `slurp.sh` test, please do not remove.'
|
tmp=hi$$
|
||||||
actual=`echo '(slurp (open "hi"))' | target/psse | tail -2 | head -1`
|
echo "Hello, there." > ${tmp}
|
||||||
|
expected='"Hello, there.'
|
||||||
|
actual=`echo "(slurp (open \"${tmp}\"))" | target/psse | tail -2 | head -1`
|
||||||
|
|
||||||
if [ "${expected}" = "${actual}" ]
|
if [ "${expected}" = "${actual}" ]
|
||||||
then
|
then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
|
rm ${tmp}
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Fail: expected '$expected', got '$actual'"
|
echo "Fail: expected '$expected', got '$actual'"
|
||||||
|
|
Loading…
Reference in a new issue