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, 5 insertions, 1 deletions
diff --git a/libgo/go/archive/zip/reader_test.go b/libgo/go/archive/zip/reader_test.go
index 4d80aab709e..ca0b04e2bba 100644
--- a/libgo/go/archive/zip/reader_test.go
+++ b/libgo/go/archive/zip/reader_test.go
@@ -98,7 +98,11 @@ func readTestZip(t *testing.T, zt ZipTest) {
if err == FormatError {
return
}
- defer z.Close()
+ defer func() {
+ if err := z.Close(); err != nil {
+ t.Errorf("error %q when closing zip file", err)
+ }
+ }()
// bail here if no Files expected to be tested
// (there may actually be files in the zip, but we don't care)