diff options
Diffstat (limited to 'test/ruby/test_econv.rb')
-rw-r--r-- | test/ruby/test_econv.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index c898efee28..6844067526 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -654,4 +654,11 @@ class TestEncodingConverter < Test::Unit::TestCase ec.replacement = "<undef>" assert_equal("a <undef> b", ec.convert("a \u3042 b")) end + + def test_econv_new_hash + ec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace) + assert_equal("a ? b", ec.convert("a \u3042 b")) + ec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace, :replace => "X") + assert_equal("a X b", ec.convert("a \u3042 b")) + end end |