diff options
Diffstat (limited to 'test/rdoc/test_rdoc_text.rb')
-rw-r--r-- | test/rdoc/test_rdoc_text.rb | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/test/rdoc/test_rdoc_text.rb b/test/rdoc/test_rdoc_text.rb index 9f0e9480d3..61f528a5a4 100644 --- a/test/rdoc/test_rdoc_text.rb +++ b/test/rdoc/test_rdoc_text.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'rdoc/test_case' +require 'minitest_helper' +require 'timeout' class TestRDocText < RDoc::TestCase @@ -377,6 +378,32 @@ paragraph will be cut off … assert_equal expected, strip_stars(text) end + def test_strip_stars_document_method_special + text = <<-TEXT +/* + * Document-method: Zlib::GzipFile#mtime= + * Document-method: [] + * Document-method: ` + * Document-method: | + * Document-method: & + * Document-method: <=> + * Document-method: =~ + * Document-method: + + * Document-method: - + * Document-method: +@ + * + * A comment + */ + TEXT + + expected = <<-EXPECTED + + A comment + EXPECTED + + assert_equal expected, strip_stars(text) + end + def test_strip_stars_encoding text = <<-TEXT /* |