aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-27 20:15:54 +0900
committergit <svn-admin@ruby-lang.org>2023-11-27 15:58:31 +0000
commit196c4aeb766a66b3557ddab61086db58c7a08226 (patch)
tree46545600783f75d9d928af9ff3c21029315a58f0 /test/rdoc
parent7835ebce97a6e6132d2bc7bdbef115f3f47cc6c2 (diff)
downloadruby-196c4aeb766a66b3557ddab61086db58c7a08226.tar.gz
[ruby/rdoc] Place a space between certain character class letters only
https://github.com/ruby/rdoc/commit/1f568e049d
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_markup_to_html.rb28
1 files changed, 24 insertions, 4 deletions
diff --git a/test/rdoc/test_rdoc_markup_to_html.rb b/test/rdoc/test_rdoc_markup_to_html.rb
index 6897c8132e..2dd8cf922d 100644
--- a/test/rdoc/test_rdoc_markup_to_html.rb
+++ b/test/rdoc/test_rdoc_markup_to_html.rb
@@ -257,7 +257,7 @@ class TestRDocMarkupToHtml < RDoc::Markup::FormatterTestCase
end
def accept_paragraph_break
- assert_equal "\n<p>hello<br> world</p>\n", @to.res.join
+ assert_equal "\n<p>hello<br>world</p>\n", @to.res.join
end
def accept_paragraph_i
@@ -391,11 +391,31 @@ class TestRDocMarkupToHtml < RDoc::Markup::FormatterTestCase
end
def test_accept_paragraph_newline
- @to.start_accepting
+ hellos = ["hello", "\u{393 3b5 3b9 3ac} \u{3c3 3bf 3c5}"]
+ worlds = ["world", "\u{3ba 3cc 3c3 3bc 3bf 3c2}"]
+ ohayo, sekai = %W"\u{304a 306f 3088 3046} \u{4e16 754c}"
+
+ hellos.product(worlds) do |hello, world|
+ @to.start_accepting
+ @to.accept_paragraph para("#{hello}\n", "#{world}\n")
+ assert_equal "\n<p>#{hello} #{world}</p>\n", @to.res.join
+ end
+
+ hellos.each do |hello|
+ @to.start_accepting
+ @to.accept_paragraph para("#{hello}\n", "#{sekai}\n")
+ assert_equal "\n<p>#{hello}#{sekai}</p>\n", @to.res.join
+ end
- @to.accept_paragraph para("hello\n", "world\n")
+ worlds.each do |world|
+ @to.start_accepting
+ @to.accept_paragraph para("#{ohayo}\n", "#{world}\n")
+ assert_equal "\n<p>#{ohayo}#{world}</p>\n", @to.res.join
+ end
- assert_equal "\n<p>hello world </p>\n", @to.res.join
+ @to.start_accepting
+ @to.accept_paragraph para("#{ohayo}\n", "#{sekai}\n")
+ assert_equal "\n<p>#{ohayo}#{sekai}</p>\n", @to.res.join
end
def test_accept_heading_output_decoration