summaryrefslogtreecommitdiff
path: root/libgo/go/archive/zip/reader_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/archive/zip/reader_test.go')
-rw-r--r--libgo/go/archive/zip/reader_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/go/archive/zip/reader_test.go b/libgo/go/archive/zip/reader_test.go
index 72e8cccfd47..c72cd9a2347 100644
--- a/libgo/go/archive/zip/reader_test.go
+++ b/libgo/go/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 {