1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-25 17:45:39 +00:00

Merge pull request #105 from vbatts/compare_test_openbsd

compare: make the test output more readable
This commit is contained in:
Vincent Batts 2016-12-08 09:59:00 -05:00 committed by GitHub
commit 556bb352d2

View file

@ -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))