From e7c21703a86458121545b814c49383bc903acfc8 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 8 Jan 2014 11:28:40 -0800 Subject: [PATCH] archive/zip: new test for earlier zip64 fix Update #7069 R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/49180043 --- src/pkg/archive/zip/reader_test.go | 14 +++++++++++++- src/pkg/archive/zip/testdata/zip64-2.zip | Bin 0 -> 266 bytes 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/pkg/archive/zip/testdata/zip64-2.zip diff --git a/src/pkg/archive/zip/reader_test.go b/src/pkg/archive/zip/reader_test.go index 78875ecbf0..4292a50e30 100644 --- a/src/pkg/archive/zip/reader_test.go +++ b/src/pkg/archive/zip/reader_test.go @@ -235,6 +235,18 @@ var tests = []ZipTest{ }, }, }, + // Another zip64 file with different Extras fields. (golang.org/issue/7069) + { + Name: "zip64-2.zip", + File: []ZipTestFile{ + { + Name: "README", + Content: []byte("This small file is in ZIP64 format.\n"), + Mtime: "08-10-12 14:33:32", + Mode: 0644, + }, + }, + }, } var crossPlatform = []ZipTestFile{ @@ -348,7 +360,7 @@ func readTestFile(t *testing.T, zt ZipTest, ft ZipTestFile, f *File) { var b bytes.Buffer r, err := f.Open() if err != nil { - t.Error(err) + t.Errorf("%s: %v", zt.Name, err) return } diff --git a/src/pkg/archive/zip/testdata/zip64-2.zip b/src/pkg/archive/zip/testdata/zip64-2.zip new file mode 100644 index 0000000000000000000000000000000000000000..f844e35373e8a28289f8556032bc8d6f6ee92ec2 GIT binary patch literal 266 zcmWIWW@Zs#U|`^2Feu@2tb6`HQw7KaVKyKRa&>g^b>%*JLMKe)obQ>FfgY#Nc!n~3 zGWsmC$cFihkI1D@-9^IQUv@AAcr!BTGV7w4^dAb?7<7Q*5U`{XL_^GFWDo$`1QG$+ z2m+xYtPIS5f>i@bE4UdLS#~KhF|c$9GXTwJV}qHZ%K)+m0vOTg1SsDFN(1$=gP1Fz Te31G8Z&r}!7+~%L(F_a#G1EK) literal 0 HcmV?d00001 -- 2.48.1