From 99cb8dc38a8624cb248dfc0afcd33ba896080324 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 21 Nov 2009 07:03:06 +0000 Subject: * io.c (read_all): fix: false negative invalid byte seequence on reading from pipes. [ruby-dev:39743] fix: assigin the variable 'pos' as relative value from recent pos. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io_m17n.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 976aae8c2..4d1a62381 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -558,6 +558,12 @@ EOT assert_equal(eucjp, r.read) } + with_pipe("UTF-8") {|r,w| + w << "a" * 1023 + "\u3042" + "a" * 1022 + w.close + assert_equal(true, r.read.valid_encoding?) + } + with_pipe("UTF-8:EUC-JP") {|r,w| assert_equal(Encoding::UTF_8, r.external_encoding) assert_equal(Encoding::EUC_JP, r.internal_encoding) -- cgit