aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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|