diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-19 05:08:28 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-19 05:08:28 +0000 |
commit | 75ef9e79d6f872d9155cfa69d717b0c693be7fc9 (patch) | |
tree | 97fa40e34793b267292d9d769150292a43f3838e /test/rdoc/test_rdoc_parser_ruby.rb | |
parent | 37e59f5583c781e98f41608251e094377237a133 (diff) | |
download | ruby-75ef9e79d6f872d9155cfa69d717b0c693be7fc9.tar.gz |
Import RDoc 2.5.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_parser_ruby.rb')
-rw-r--r-- | test/rdoc/test_rdoc_parser_ruby.rb | 27 |
1 files changed, 27 insertions, 0 deletions
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 |