complete testing routine

This commit is contained in:
Quentin Carbonneaux 2016-03-03 09:44:06 -05:00
parent 3a12c94b73
commit 99965071d2
2 changed files with 83 additions and 0 deletions

View file

@ -66,6 +66,23 @@ once() {
return 1
fi
if test -s $OUT
then
$BIN | diff - $OUT > /dev/null
RET=$?
REASON="output"
else
$BIN
RET=$?
REASON="return"
fi
if test $RET -ne 0
then
echo "[$REASON, fail]"
return 1
fi
echo "[ok]"
}