summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/zlib/test_zlib.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index aa3059d5b1..abb3ea32b3 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -470,10 +470,12 @@ if defined? Zlib
def test_read
t = Tempfile.new("test_zlib_gzip_reader")
t.close
- Zlib::GzipWriter.open(t.path) {|gz| gz.print("foobar") }
+ str = "\u3042\u3044\u3046"
+ Zlib::GzipWriter.open(t.path) {|gz| gz.print(str) }
- f = Zlib::GzipReader.open(t.path)
+ f = Zlib::GzipReader.open(t.path, encoding: "UTF-8")
assert_raise(ArgumentError) { f.read(-1) }
+ assert_equal(str, f.read)
end
def test_readpartial