From: Oleg Broytman Date: Sat, 21 Oct 2017 17:22:05 +0000 (+0300) Subject: Tests: On fail show diff immediately X-Git-Tag: 2.8.0~8 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=6dcbe5a0d373066bdd015e9c5e45f695c87e6f21;p=mimedecode.git Tests: On fail show diff immediately Useful with Travis console. --- diff --git a/test/test_all b/test/test_all index 83fd08b..1074273 100755 --- a/test/test_all +++ b/test/test_all @@ -34,7 +34,7 @@ test1() { if cmp -s expected/"$expfile" tmp/"$expfile"; then rm tmp/"$expfile" && return 0 || return 1 else - diff --text expected/"$expfile" tmp/"$expfile" >tmp/"$expfile".diff + diff --text expected/"$expfile" tmp/"$expfile" | tee tmp/"$expfile".diff return 1 fi } @@ -94,6 +94,8 @@ test2() { if cmp -s expected-save/"$expsavefile" save/"$savefile"; then rm save/"$savefile" && return 0 || return 1 else + ls -lAF save/ + diff --text expected-save/"$expsavefile" save/"$savefile" | tee save/"$expsavefile".diff return 1 fi }