[ruby/rdoc] test: add coverage for comment format in a C file
https://github.com/ruby/rdoc/commit/3b8334a796
This commit is contained in:
parent
19beb028e7
commit
9225f3c1c6
@ -1930,6 +1930,22 @@ void d(void) {
|
||||
@store.all_classes_and_modules.map { |m| m.full_name }.sort
|
||||
end
|
||||
|
||||
def test_markup_format_default
|
||||
content = <<-EOF
|
||||
void Init_Blah(void) {
|
||||
cBlah = rb_define_class("Blah", rb_cObject);
|
||||
|
||||
/*
|
||||
* This should be interpreted in the default format.
|
||||
*/
|
||||
rb_attr(cBlah, rb_intern("default_format"), 1, 1, Qfalse);
|
||||
}
|
||||
EOF
|
||||
|
||||
klass = util_get_class content, 'cBlah'
|
||||
assert_equal("rdoc", klass.attributes.find {|a| a.name == "default_format"}.comment.format)
|
||||
end
|
||||
|
||||
def util_get_class content, name = nil
|
||||
@parser = util_parser content
|
||||
@parser.scan
|
||||
|
Loading…
x
Reference in New Issue
Block a user