From e0477f165d0050ce20a4a4dbaee49fe968e886eb Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 5 Mar 2026 21:16:53 +0800 Subject: internal/compress/zlib: Check errors properly and prettify --- internal/compress/zlib/reader_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/compress/zlib/reader_test.go') diff --git a/internal/compress/zlib/reader_test.go b/internal/compress/zlib/reader_test.go index e8a44007..6fda1f27 100644 --- a/internal/compress/zlib/reader_test.go +++ b/internal/compress/zlib/reader_test.go @@ -40,7 +40,8 @@ var zlibTests = []zlibTest{ { "truncated checksum", "", - []byte{0x78, 0xbb, 0x00, 0x01, 0x00, 0x01, 0xca, 0x48, + []byte{ + 0x78, 0xbb, 0x00, 0x01, 0x00, 0x01, 0xca, 0x48, 0xcd, 0xc9, 0xc9, 0xd7, 0x51, 0x28, 0xcf, 0x2f, 0xca, 0x49, 0x01, 0x04, 0x00, 0x00, 0xff, 0xff, }, @@ -162,7 +163,6 @@ func TestDecompressor(t *testing.T) { continue } - defer zr.Close() // Read and verify correctness of data. b.Reset() -- cgit v1.3.1-10-gc9f91