From 75ef9e79d6f872d9155cfa69d717b0c693be7fc9 Mon Sep 17 00:00:00 2001 From: drbrain Date: Mon, 19 Apr 2010 05:08:28 +0000 Subject: Import RDoc 2.5.4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rdoc/test_rdoc_parser_ruby.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'test/rdoc/test_rdoc_parser_ruby.rb') diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb index 629bca0c83..d9a7a4f3d5 100644 --- a/test/rdoc/test_rdoc_parser_ruby.rb +++ b/test/rdoc/test_rdoc_parser_ruby.rb @@ -1210,6 +1210,33 @@ EOF assert_equal 1, @top_level.requires.length end + def test_parse_statements_while_begin + util_parser <<-RUBY +class A + def a + while begin a; b end + end + end + + def b + end +end + RUBY + + @parser.parse_statements @top_level, RDoc::Parser::Ruby::NORMAL, nil, '' + + c_a = @top_level.classes.first + assert_equal 'A', c_a.full_name + + assert_equal 1, @top_level.classes.length + + m_a = c_a.method_list.first + m_b = c_a.method_list.last + + assert_equal 'A#a', m_a.full_name + assert_equal 'A#b', m_b.full_name + end + def test_parse_top_level_statements_alias_method content = <<-CONTENT class A -- cgit v1.2.3