diff options
Diffstat (limited to 'test/zlib')
-rw-r--r-- | test/zlib/test_zlib.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index fe8cee5622..5746f036ea 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -470,10 +470,20 @@ if defined? Zlib Zlib::GzipWriter.open(t.path) {|gz| gz.print("foobar") } f = Zlib::GzipReader.open(t.path) - "foobar".each_byte {|c| assert_equal(c, f.getc) } + "foobar".each_char {|c| assert_equal(c, f.getc) } assert_nil(f.getc) end + def test_getbyte + t = Tempfile.new("test_zlib_gzip_reader") + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.print("foobar") } + + f = Zlib::GzipReader.open(t.path) + "foobar".each_byte {|c| assert_equal(c, f.getbyte) } + assert_nil(f.getbyte) + end + def test_readchar t = Tempfile.new("test_zlib_gzip_reader") t.close |