1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/zlib/test_zlib.rb (test_inflate_partial_input): Added test for

inflating incomplete zlib streams.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-07-03 22:08:04 +00:00
parent 98cbc7070d
commit 0e9b0c8c84
2 changed files with 24 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Wed Jul 4 07:05:59 2012 Eric Hodel <drbrain@segment7.net>
* test/zlib/test_zlib.rb (test_inflate_partial_input): Added test for
inflating incomplete zlib streams.
Tue Jul 3 23:14:16 2012 Naohisa Goto <ngotogenome@gmail.com>
* gc.c (ATOMIC_SIZE_EXCHANGE): fix function name on Solaris [Bug #6689]

View file

@ -212,6 +212,25 @@ if defined? Zlib
z << "foo" # ???
end
def test_inflate_partial_input
deflated = Zlib::Deflate.deflate "\0"
a = deflated[0...2]
b = deflated[2..-1]
z = Zlib::Inflate.new
inflated = ""
deflated.each_char do |byte|
inflated << z.inflate(byte)
end
inflated << z.finish
assert_equal "\0", inflated
end
def test_inflate_dictionary
dictionary = "foo"