1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-06-29 14:35:37 +00:00
parent 6a4aa4838c
commit 5b593e3889
79 changed files with 1555 additions and 304 deletions

View file

@ -0,0 +1,17 @@
require File.expand_path('../../../../spec_helper', __FILE__)
require 'stringio'
require 'zlib'
describe 'GzipReader#readpartial' do
before :each do
@data = '12345abcde'
@zip = [31, 139, 8, 0, 44, 220, 209, 71, 0, 3, 51, 52, 50, 54, 49, 77,
76, 74, 78, 73, 5, 0, 157, 5, 0, 36, 10, 0, 0, 0].pack('C*')
@io = StringIO.new(@zip)
end
it 'accepts nil buffer' do
gz = Zlib::GzipReader.new(@io)
gz.readpartial(5, nil).should == '12345'
end
end