summaryrefslogtreecommitdiff
path: root/test/ruby/test_io_m17n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io_m17n.rb')
-rw-r--r--test/ruby/test_io_m17n.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index 90dd831dd5..b8b532e94c 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -239,6 +239,16 @@ EOT
w.close if w && !w.closed?
end
+ def test_s_pipe_undef_replace_string
+ r, w = IO.pipe("utf-8:euc-jp", :undef=>:replace, :replace=>"X")
+ w << "\ufffd"
+ w.close
+ assert_equal("X", r.read)
+ ensure
+ r.close if r && !r.closed?
+ w.close if w && !w.closed?
+ end
+
def test_dup
with_pipe("utf-8:euc-jp") {|r, w|
w << "\u3042"