From a86d4eef4b4551a48a5329bb993c3c6c39a1b1f3 Mon Sep 17 00:00:00 2001 From: aycabta Date: Tue, 22 Jan 2019 04:46:46 +0900 Subject: [ruby/rdoc] Normalization of comment should check language RDoc::Text#normalize_comment that is included RDoc::Comment always remove Ruby style comment indicator "#" and C style comment indicator "/**/", but should check language and remove only the language's comment indicator. https://github.com/ruby/rdoc/commit/ca68ba1e73 --- test/rdoc/test_rdoc_text.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/rdoc/test_rdoc_text.rb') diff --git a/test/rdoc/test_rdoc_text.rb b/test/rdoc/test_rdoc_text.rb index 2669766e71..fcd993f834 100644 --- a/test/rdoc/test_rdoc_text.rb +++ b/test/rdoc/test_rdoc_text.rb @@ -13,6 +13,7 @@ class TestRDocText < RDoc::TestCase @options = RDoc::Options.new @top_level = @store.add_file 'file.rb' + @language = nil end def test_self_encode_fallback @@ -137,6 +138,8 @@ we don't worry too much. The comments associated with EXPECTED + @language = :ruby + assert_equal expected, normalize_comment(text) end @@ -155,6 +158,8 @@ we don't worry too much. The comments associated with EXPECTED + @language = :c + assert_equal expected, normalize_comment(text) end @@ -173,6 +178,8 @@ we don't worry too much. The comments associated with EXPECTED + @language = :c + assert_equal expected, normalize_comment(text) end @@ -200,6 +207,8 @@ The comments associated with end def test_parse_empty_newline + @language = :ruby + assert_equal RDoc::Markup::Document.new, parse("#\n") end -- cgit v1.2.3