summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-08 14:08:44 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-08 14:08:44 +0000
commit95ffc73ea80c4b77541ac274ae98309f9c04e581 (patch)
tree2c7212cc039c4e366d68185abe071eaefdcc1d4e /test
parent3cb7d475a918f6ea7392003d3b24fe2503c41a17 (diff)
downloadruby-95ffc73ea80c4b77541ac274ae98309f9c04e581.tar.gz
ruby-95ffc73ea80c4b77541ac274ae98309f9c04e581.tar.xz
ruby-95ffc73ea80c4b77541ac274ae98309f9c04e581.zip
* transcode.c (rb_econv_insert_output): "readagain" part should be
after replacement. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_econv.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index 514cac568..d796db882 100644
--- a/test/ruby/test_econv.rb
+++ b/test/ruby/test_econv.rb
@@ -798,4 +798,9 @@ class TestEncodingConverter < Test::Unit::TestCase
assert_equal("&amp;\u3046\u2661&amp;\"'".force_encoding("utf-8"),
"&\u3046\u2661&\"'".encode("utf-8", xml: :text))
end
+
+ def test_iso2022jp_invalid_replace
+ assert_equal("?x".force_encoding("iso-2022-jp"),
+ "\222\xA1x".encode("iso-2022-jp", "stateless-iso-2022-jp", :invalid => :replace))
+ end
end