compare: make the test output more readable
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
26ccc7a48c
commit
d857d58104
1 changed files with 7 additions and 1 deletions
|
@ -3,6 +3,7 @@ package mtree
|
|||
import (
|
||||
"archive/tar"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
@ -443,8 +444,13 @@ func TestTarCompare(t *testing.T) {
|
|||
}
|
||||
|
||||
actualFailure = true
|
||||
buf, err := json.MarshalIndent(delta, "", " ")
|
||||
if err == nil {
|
||||
t.Logf("FAILURE: diff[%d] = %s", i, string(buf))
|
||||
} else {
|
||||
t.Logf("FAILURE: diff[%d] = %#v", i, delta)
|
||||
}
|
||||
}
|
||||
|
||||
if actualFailure {
|
||||
t.Errorf("expected the diff length to be 0, got %d", len(diffs))
|
||||
|
|
Loading…
Reference in a new issue