summaryrefslogtreecommitdiff
path: root/test/zlib
diff options
context:
space:
mode:
Diffstat (limited to 'test/zlib')
-rw-r--r--test/zlib/test_zlib.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index 7df53bd..7d703d1 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -488,6 +488,17 @@ if defined? Zlib
}
end
+ def test_zero_mtime
+ sio = StringIO.new
+ gz = Zlib::GzipWriter.new(sio)
+ gz.mtime = 0
+ gz.write("Hi")
+ gz.close
+ reading_io = StringIO.new(sio.string)
+ reader = Zlib::GzipReader.new(reading_io)
+ assert_equal(0, reader.mtime.to_i)
+ end
+
def test_level
Tempfile.create("test_zlib_gzip_file_level") {|t|
t.close