aboutsummaryrefslogtreecommitdiffstats
path: root/test/rdoc/test_rdoc_parser_simple.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/test_rdoc_parser_simple.rb')
-rw-r--r--test/rdoc/test_rdoc_parser_simple.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_parser_simple.rb b/test/rdoc/test_rdoc_parser_simple.rb
index 0b35a66c5e..6edb51481a 100644
--- a/test/rdoc/test_rdoc_parser_simple.rb
+++ b/test/rdoc/test_rdoc_parser_simple.rb
@@ -22,6 +22,25 @@ class TestRDocParserSimple < MiniTest::Unit::TestCase
@tempfile.close
end
+ def test_remove_coding_comment
+ parser = util_parser <<-TEXT
+# -*- mode: rdoc; coding: utf-8; fill-column: 74; -*-
+
+Regular expressions (<i>regexp</i>s) are patterns which describe the
+contents of a string.
+ TEXT
+
+ parser.scan
+
+ expected = <<-TEXT.strip
+
+Regular expressions (<i>regexp</i>s) are patterns which describe the
+contents of a string.
+ TEXT
+
+ assert_equal expected, @top_level.comment
+ end
+
def test_remove_private_comments
parser = util_parser ''
text = "foo\n\n--\nbar\n++\n\nbaz\n"