summaryrefslogtreecommitdiff
path: root/src/pkg/archive/zip/reader_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/archive/zip/reader_test.go')
-rw-r--r--src/pkg/archive/zip/reader_test.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/pkg/archive/zip/reader_test.go b/src/pkg/archive/zip/reader_test.go
index cf9c59c4b..833ba28ad 100644
--- a/src/pkg/archive/zip/reader_test.go
+++ b/src/pkg/archive/zip/reader_test.go
@@ -64,6 +64,24 @@ var tests = []ZipTest{
},
},
{
+ Name: "test-trailing-junk.zip",
+ Comment: "This is a zipfile comment.",
+ File: []ZipTestFile{
+ {
+ Name: "test.txt",
+ Content: []byte("This is a test text file.\n"),
+ Mtime: "09-05-10 12:12:02",
+ Mode: 0644,
+ },
+ {
+ Name: "gophercolor16x16.png",
+ File: "gophercolor16x16.png",
+ Mtime: "09-05-10 15:52:58",
+ Mode: 0644,
+ },
+ },
+ },
+ {
Name: "r.zip",
Source: returnRecursiveZip,
File: []ZipTestFile{
@@ -262,7 +280,7 @@ func readTestZip(t *testing.T, zt ZipTest) {
}
}
if err != zt.Error {
- t.Errorf("error=%v, want %v", err, zt.Error)
+ t.Errorf("%s: error=%v, want %v", zt.Name, err, zt.Error)
return
}