Skip to content

Commit

Permalink
Regression test for JRUBY-5863.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius authored and dekellum committed Aug 3, 2012
1 parent fc17ab4 commit 22a52eb
Showing 1 changed file with 19 additions and 0 deletions.
@@ -0,0 +1,19 @@
require 'rspec'
require 'stringio'
require 'zlib'

describe 'JRUBY-6559: GZipReader rewind with buffered input' do
it "rewinds properly when the input is buffered internally" do
zio = StringIO.new
io = Zlib::GzipWriter.new zio
io.write 'aaaa'
io.finish
zio << "junk" # this is buffered by Zlib
zio.rewind

io = Zlib::GzipReader.new(zio)
io.read.should == 'aaaa'
io.rewind
io.read.should == 'aaaa'
end
end

0 comments on commit 22a52eb

Please sign in to comment.