summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_econv.rb7
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("&amp;\e$B$&\e(B&amp;".force_encoding("iso-2022-jp"), ec.convert("&\u3046&"))
assert_equal('', ec.finish)
end
+
+ def test_html_hasharg
+ assert_equal("&amp;\e$B$&\e(B&#x2665;&amp;\"'".force_encoding("iso-2022-jp"),
+ "&\u3046\u2665&\"'".encode("iso-2022-jp", html: :text))
+ assert_equal("\"&amp;\e$B$&\e(B&#x2661;&amp;&quot;'\"".force_encoding("iso-2022-jp"),
+ "&\u3046\u2661&\"'".encode("iso-2022-jp", html: :attr))
+ end
end