summaryrefslogtreecommitdiff
path: root/test/zlib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-23 07:06:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-23 07:06:12 +0000
commit585cbf65351ca10ebe673fefac22fdb9864779eb (patch)
tree3d2afa50d4599f14242a6492b8e6bfaaccb75412 /test/zlib
parentcf4351f82a8e7ea18b351c9d06b0ea76fb6d0d85 (diff)
zlib.c: multiple arguments to write
* ext/zlib/zlib.c (rb_gzwriter_write): accepts multiple arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/zlib')
-rw-r--r--test/zlib/test_zlib.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index 2d539dd..c464bb2 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -1057,6 +1057,14 @@ if defined? Zlib
}
end
+ def test_puts
+ Tempfile.create("test_zlib_gzip_writer_puts") {|t|
+ t.close
+ Zlib::GzipWriter.open(t.path) {|gz| gz.puts("foo") }
+ assert_equal("foo\n", Zlib::GzipReader.open(t.path) {|gz| gz.read })
+ }
+ end
+
def test_writer_wrap
Tempfile.create("test_zlib_gzip_writer_wrap") {|t|
t.binmode