diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 19:55:18 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-23 19:55:18 +0000 |
commit | c749064f9f250d79db6ada0fe7f1f0784c183baa (patch) | |
tree | 88f3c790bc442b74069069332367147bf2b8113f /test/ruby/test_io_m17n.rb | |
parent | b4f2e2ba074fb8eb689769ca4623eedcc265092c (diff) | |
download | ruby-c749064f9f250d79db6ada0fe7f1f0784c183baa.tar.gz |
* io.c (appendline): should do multibyte aware RS search.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 88e862dff6..4b8273b40b 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -60,8 +60,8 @@ EOT s = open("tmp", "r:euc-jp:utf-8") {|f| f.gets("\xA2\xA2".force_encoding("euc-jp").encode("utf-8")) } - assert_equal(Encoding.find("euc-jp"), s.encoding) - assert_str_equal("before \xA1\xA2\xA2\xA3 after".force_encoding("iso-8859-1"), s, '[ruby-core:14319]') + assert_equal(Encoding.find("utf-8"), s.encoding) + assert_str_equal("before \xA1\xA2\xA2\xA3 after".force_encoding("euc-jp").encode("utf-8"), s, '[ruby-core:14319]') } end @@ -196,8 +196,6 @@ EOT w.close s = r.read assert_equal(Encoding.default_external, s.encoding) - puts encdump(s) - puts encdump(utf8) assert_str_equal(utf8, s) } @@ -226,7 +224,9 @@ EOT } } - ENCS.reject {|e| e == Encoding::ASCII_8BIT }.each {|enc| + ENCS.each {|enc| + next if enc == Encoding::ASCII_8BIT + next if enc == Encoding::UTF_8 with_pipe("#{enc}:UTF-8") {|r, w| w << "\xc2\xa1" w.close |