summaryrefslogtreecommitdiff
path: root/test/ruby/test_io_m17n.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-27 13:39:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-27 13:39:25 +0000
commitad3c6c712b48843bf12cca4bc7d5290f34b0866d (patch)
tree52d466f73a868edb418fd5302d5167b677651015 /test/ruby/test_io_m17n.rb
parent4c88439a94f8ba971f2301d41c64234c15a1af7b (diff)
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r--test/ruby/test_io_m17n.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index 2caa2cb2b8..90dd831dd5 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -826,6 +826,14 @@ EOT
}
end
+ def test_read_stateful
+ with_pipe("euc-jp:iso-2022-jp") {|r, w|
+ w << "\xA4\xA2"
+ w.close
+ assert_equal("\e$B$\"\e(B".force_encoding("iso-2022-jp"), r.read)
+ }
+ end
+
def test_stdin_external_encoding_with_reopen
with_tmpdir {
open("tst", "w+") {|f|