diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-27 13:39:25 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-27 13:39:25 +0000 |
commit | 7342abffaa7292c719511ee6d619a7c3d475fc35 (patch) | |
tree | 52d466f73a868edb418fd5302d5167b677651015 /test/ruby/test_io_m17n.rb | |
parent | ce8d93dd833b75484a50c8867335ef672b6db8ad (diff) | |
download | ruby-7342abffaa7292c719511ee6d619a7c3d475fc35.tar.gz ruby-7342abffaa7292c719511ee6d619a7c3d475fc35.tar.xz ruby-7342abffaa7292c719511ee6d619a7c3d475fc35.zip |
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/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.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 2caa2cb2b..90dd831dd 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| |