tests: Save diff -u between expected and actual output
"diff -q" isn't blessed by POSIX anyway. Neither is -u, but it should be widely available. -c is blessed, but I find its output hard to read. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
b7bcf8fde2
commit
c2683e5b58
1 changed files with 2 additions and 3 deletions
|
@ -163,7 +163,7 @@ end_test ()
|
||||||
|
|
||||||
cmp_out()
|
cmp_out()
|
||||||
{
|
{
|
||||||
local opt exp act nrm msg ret=0
|
local opt exp act nrm ret=0
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
case "$i" in
|
case "$i" in
|
||||||
|
@ -175,7 +175,7 @@ cmp_out()
|
||||||
act="sandbox/$i"
|
act="sandbox/$i"
|
||||||
nrm="sandbox/normalized-${i##*/}"
|
nrm="sandbox/normalized-${i##*/}"
|
||||||
perl "$srcdir"/tests/normalize.pl $opt "$act" >"$nrm"
|
perl "$srcdir"/tests/normalize.pl $opt "$act" >"$nrm"
|
||||||
if msg=`diff -q "$exp" "$nrm"`
|
if diff -u "$exp" "$nrm" >"$nrm.diff"
|
||||||
then
|
then
|
||||||
echo "$i OK"
|
echo "$i OK"
|
||||||
elif [ "$EMPIRE_CHECK_ACCEPT" ]
|
elif [ "$EMPIRE_CHECK_ACCEPT" ]
|
||||||
|
@ -185,7 +185,6 @@ cmp_out()
|
||||||
else
|
else
|
||||||
ret=$?
|
ret=$?
|
||||||
echo "$i FAIL"
|
echo "$i FAIL"
|
||||||
echo $msg
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
return $ret
|
return $ret
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue