diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-06 06:07:34 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-06 06:07:34 +0000 |
commit | e490d925486bfff70eeb3630e9ab0a4dc1e6ee21 (patch) | |
tree | 1361fe85f24c116ab272ad1902ea3802b09a5ab6 /test/ruby/test_econv.rb | |
parent | 34be4c1ce5c6ad39720a48a015b40f6cc4e25ca5 (diff) | |
download | ruby-e490d925486bfff70eeb3630e9ab0a4dc1e6ee21.tar.gz |
* transcode.c (sym_html): new variable.
(sym_text): ditto.
(sym_attr): ditto.
(econv_opts): check :html=>:text and :html=>:attr.
(Init_transcode): initialize the above variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 6966ff4e82..3f82d2742c 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -768,4 +768,11 @@ class TestEncodingConverter < Test::Unit::TestCase assert_equal("&\e$B$&\e(B&".force_encoding("iso-2022-jp"), ec.convert("&\u3046&")) assert_equal('', ec.finish) end + + def test_html_hasharg + assert_equal("&\e$B$&\e(B♥&\"'".force_encoding("iso-2022-jp"), + "&\u3046\u2665&\"'".encode("iso-2022-jp", html: :text)) + assert_equal("\"&\e$B$&\e(B♡&"'\"".force_encoding("iso-2022-jp"), + "&\u3046\u2661&\"'".encode("iso-2022-jp", html: :attr)) + end end |