Skip to content

Commit 6ff1766

Browse files
committed
Add test_parse_method_parameters_with_paren_comment_continue
1 parent f3807d7 commit 6ff1766

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/test_rdoc_parser_ruby.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,20 @@ def test_parse_method_parameters_comment_continue
19581958
assert_equal '(arg1, arg2, arg3)', foo.params
19591959
end
19601960

1961+
def test_parse_method_parameters_with_paren_comment_continue
1962+
klass = RDoc::NormalClass.new 'Foo'
1963+
klass.parent = @top_level
1964+
1965+
util_parser "def foo(arg1, arg2, # some useful comment\narg3)\nend"
1966+
1967+
tk = @parser.get_tk
1968+
1969+
@parser.parse_method klass, RDoc::Parser::Ruby::NORMAL, tk, @comment
1970+
1971+
foo = klass.method_list.first
1972+
assert_equal '(arg1, arg2, arg3)', foo.params
1973+
end
1974+
19611975
def test_parse_method_star
19621976
klass = RDoc::NormalClass.new 'Foo'
19631977
klass.parent = @top_level

0 commit comments

Comments
 (0)