diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-13 07:58:47 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-13 07:58:47 +0000 |
commit | d8c7695fbb2944aba9a69dce75f41b6881d1fc12 (patch) | |
tree | be6a5904c879c9fa9a7c2556031064233e70880b /test/rdoc/test_rdoc_class_module.rb | |
parent | a0046fe94972ba4873244a1b985cb69f1685b5f3 (diff) |
* lib/rdoc/class_module.rb: Fixed duplicate comments for classes and
modules from C.
* test/rdoc/test_rdoc_class_module.rb: Test for the above.
* lib/rdoc/parser/c.rb: Reload C variable names to allow proper
updates of an ri store for C files.
* lib/rdoc/rdoc.rb: ditto.
* lib/rdoc/store.rb: ditto.
* test/rdoc/test_rdoc_parser_c.rb: Test for the above.
* test/rdoc/test_rdoc_store.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_class_module.rb')
-rw-r--r-- | test/rdoc/test_rdoc_class_module.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_class_module.rb b/test/rdoc/test_rdoc_class_module.rb index e5d855b2cd..670f732290 100644 --- a/test/rdoc/test_rdoc_class_module.rb +++ b/test/rdoc/test_rdoc_class_module.rb @@ -41,6 +41,16 @@ class TestRDocClassModule < XrefTestCase assert_equal 'comment', cm.comment.text end + def test_add_comment_duplicate + tl1 = @store.add_file 'one.rb' + + cm = RDoc::ClassModule.new 'Klass' + cm.add_comment '# comment 1', tl1 + cm.add_comment '# comment 2', tl1 + + assert_equal [['comment 2', tl1]], cm.comment_location + end + def test_add_comment_stopdoc tl = @store.add_file 'file.rb' |