File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -2528,6 +2528,40 @@ def blah()
25282528 assert_equal markup_code , expected
25292529 end
25302530
2531+ def test_parse_statements_embdoc_in_document
2532+ @filename = 'file.rb'
2533+ util_parser <<RUBY
2534+ class Foo
2535+ # doc
2536+ #
2537+ # =begin
2538+ # test embdoc
2539+ # =end
2540+ #
2541+ def blah
2542+ end
2543+ end
2544+ RUBY
2545+
2546+ expected = <<EXPTECTED
2547+ <p>doc
2548+
2549+ <pre class="ruby"><span class="ruby-comment">=begin
2550+ test embdoc
2551+ =end</span>
2552+ </pre>
2553+ EXPTECTED
2554+
2555+ @parser . scan
2556+
2557+ foo = @top_level . classes . first
2558+ assert_equal 'Foo' , foo . full_name
2559+
2560+ blah = foo . method_list . first
2561+ markup_comment = blah . search_record [ 6 ]
2562+ assert_equal markup_comment , expected
2563+ end
2564+
25312565 def test_parse_require_dynamic_string
25322566 content = <<-RUBY
25332567prefix = 'path'
You can’t perform that action at this time.
0 commit comments