diff options
author | Benoit Daloze <[email protected]> | 2023-05-29 15:27:57 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2023-05-29 15:27:57 +0200 |
commit | c48d496e8cfdf8243d2beb28623954003adaf7fc (patch) | |
tree | 2d53327b3126360ccb42f9dae9889b7f329ad035 /spec/ruby/library/zlib/gzipreader | |
parent | 98f500d0958d12b1909f4638abf33682d75f3fe6 (diff) |
Update to ruby/spec@c3677cf
Diffstat (limited to 'spec/ruby/library/zlib/gzipreader')
-rw-r--r-- | spec/ruby/library/zlib/gzipreader/mtime_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/library/zlib/gzipreader/mtime_spec.rb b/spec/ruby/library/zlib/gzipreader/mtime_spec.rb new file mode 100644 index 0000000000..e8e71fa72e --- /dev/null +++ b/spec/ruby/library/zlib/gzipreader/mtime_spec.rb @@ -0,0 +1,11 @@ +require_relative '../../../spec_helper' +require 'zlib' +require 'stringio' + +describe "Zlib::GzipReader#mtime" do + it "returns the timestamp from the Gzip header" do + io = StringIO.new "\x1f\x8b\x08\x00\x44\x33\x22\x11\x00\xff\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00" + gz = Zlib::GzipReader.new(io) + gz.mtime.to_i.should == 0x11223344 + end +end |