diff options
Diffstat (limited to 'test/rdoc/test_rdoc_parser_c.rb')
-rw-r--r-- | test/rdoc/test_rdoc_parser_c.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_parser_c.rb b/test/rdoc/test_rdoc_parser_c.rb index 301e042bcc..38fb908492 100644 --- a/test/rdoc/test_rdoc_parser_c.rb +++ b/test/rdoc/test_rdoc_parser_c.rb @@ -201,6 +201,26 @@ Multiline comment goes here because this comment spans multiple lines. assert constants.empty?, constants.inspect end + def test_find_class_comment_include + @options.rdoc_include << File.dirname(__FILE__) + + content = <<-EOF +/* + * a comment for class Foo + * + * :include: test.txt + */ +void +Init_Foo(void) { + VALUE foo = rb_define_class("Foo", rb_cObject); +} + EOF + + klass = util_get_class content, 'foo' + + assert_equal "a comment for class Foo\n\ntest file", klass.comment + end + def test_find_class_comment_init content = <<-EOF /* |