From 4260aa1dc399e1bb4a2147409ed1139112cfefb8 Mon Sep 17 00:00:00 2001 From: drbrain Date: Sun, 7 Dec 2014 01:22:37 +0000 Subject: * lib/rdoc: Update to RDoc 4.2.0. * test/rdoc: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rdoc/test_rdoc_stats.rb | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'test/rdoc/test_rdoc_stats.rb') diff --git a/test/rdoc/test_rdoc_stats.rb b/test/rdoc/test_rdoc_stats.rb index 7d336bedc8..cd37c29fce 100644 --- a/test/rdoc/test_rdoc_stats.rb +++ b/test/rdoc/test_rdoc_stats.rb @@ -663,5 +663,60 @@ m(a, b) { |c, d| ... } RDoc::Markup::ToRdoc.new end + def test_undoc_params + method = RDoc::AnyMethod.new [], 'm' + method.params = '(a)' + method.comment = comment 'comment' + + total, undoc = @s.undoc_params method + + assert_equal 1, total + assert_equal %w[a], undoc + end + + def test_undoc_params_block + method = RDoc::AnyMethod.new [], 'm' + method.params = '(&a)' + method.comment = comment '+a+' + + total, undoc = @s.undoc_params method + + assert_equal 1, total + assert_empty undoc + end + + def test_undoc_params_documented + method = RDoc::AnyMethod.new [], 'm' + method.params = '(a)' + method.comment = comment '+a+' + + total, undoc = @s.undoc_params method + + assert_equal 1, total + assert_empty undoc + end + + def test_undoc_params_keywords + method = RDoc::AnyMethod.new [], 'm' + method.params = '(**a)' + method.comment = comment '+a+' + + total, undoc = @s.undoc_params method + + assert_equal 1, total + assert_empty undoc + end + + def test_undoc_params_splat + method = RDoc::AnyMethod.new [], 'm' + method.params = '(*a)' + method.comment = comment '+a+' + + total, undoc = @s.undoc_params method + + assert_equal 1, total + assert_empty undoc + end + end -- cgit v1.2.3