From 179471b6486b2cb3e6e24eed1d9f86f2e880e334 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 17 Feb 2019 17:13:20 +0100 Subject: ParseHeader: print hexdump on error Should help debugging https://github.com/rfjakob/gocryptfs/issues/363 --- tests/matrix/matrix_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go index 33d2ab2..65dd691 100644 --- a/tests/matrix/matrix_test.go +++ b/tests/matrix/matrix_test.go @@ -98,13 +98,13 @@ func testWriteN(t *testing.T, fn string, n int) string { } d := make([]byte, n) - written, err := file.Write(d) - if err != nil || written != len(d) { - t.Errorf("err=\"%s\", written=%d", err, written) + _, err := file.Write(d) + if err != nil { + t.Fatal(err) } err = file.Close() if err != nil { - t.Error(err) + t.Fatal(err) } test_helpers.VerifySize(t, test_helpers.DefaultPlainDir+"/"+fn, n) -- cgit v1.2.3