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.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/archive/zip/reader_test.go b/src/pkg/archive/zip/reader_test.go
index 72e8cccfd..c72cd9a23 100644
--- a/src/pkg/archive/zip/reader_test.go
+++ b/src/pkg/archive/zip/reader_test.go
@@ -76,6 +76,12 @@ func readTestZip(t *testing.T, zt ZipTest) {
return
}
+ // bail if file is not zip
+ if err == FormatError {
+ return
+ }
+ defer z.Close()
+
// bail here if no Files expected to be tested
// (there may actually be files in the zip, but we don't care)
if zt.File == nil {