summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-28 12:19:26 +0900
committergit <svn-admin@ruby-lang.org>2021-09-11 17:03:26 +0900
commitc5c0f5c65262f621484c711229e8c4de0b58d9d9 (patch)
tree64775aebb428c376c633c992d18df5078840f4ab /test
parent30b4da2bc1300bb37c7d6cd3b097768a99ab4dba (diff)
[ruby/rdoc] Convert single quotes in character entity references
As well as double quotes. https://github.com/ruby/rdoc/pull/824#discussion_r683173389 https://github.com/ruby/rdoc/commit/09002bdab5
Diffstat (limited to 'test')
-rw-r--r--test/rdoc/test_rdoc_text.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_text.rb b/test/rdoc/test_rdoc_text.rb
index 59d63b29bd..02c56a2829 100644
--- a/test/rdoc/test_rdoc_text.rb
+++ b/test/rdoc/test_rdoc_text.rb
@@ -485,6 +485,13 @@ The comments associated with
assert_equal '‘a’ ‘', to_html("'a' '")
end
+ def test_to_html_apostrophe_entity
+ assert_equal '‘a', to_html("&#39;a")
+ assert_equal 'a’', to_html("a&#39;")
+
+ assert_equal '‘a’ ‘', to_html("&#39;a&#39; &#39;")
+ end
+
def test_to_html_backslash
assert_equal 'S', to_html('\\S')
end