]> git.phdru.name Git - mimedecode.git/commitdiff
Tests: On fail show diff immediately
authorOleg Broytman <phd@phdru.name>
Sat, 21 Oct 2017 17:22:05 +0000 (20:22 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 22 Oct 2017 20:26:20 +0000 (23:26 +0300)
Useful with Travis console.

test/test_all

index 83fd08b847162361030476c926a3d61901da5121..1074273b44cc78328a437ac1fb10cfc306872b1f 100755 (executable)
@@ -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
 }