[前][次][番号順一覧][スレッド一覧]

ruby-changes:68482

From: Mike <ko1@a...>
Date: Sat, 16 Oct 2021 01:39:24 +0900 (JST)
Subject: [ruby-changes:68482] 9225f3c1c6 (master): [ruby/rdoc] test: add coverage for comment format in a C file

https://git.ruby-lang.org/ruby.git/commit/?id=9225f3c1c6

From 9225f3c1c6304904a33ffaa608c77424441621e9 Mon Sep 17 00:00:00 2001
From: Mike Dalessio <mike.dalessio@g...>
Date: Mon, 11 Oct 2021 16:46:27 -0400
Subject: [ruby/rdoc] test: add coverage for comment format in a C file

https://github.com/ruby/rdoc/commit/3b8334a796
---
 test/rdoc/test_rdoc_parser_c.rb | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/test/rdoc/test_rdoc_parser_c.rb b/test/rdoc/test_rdoc_parser_c.rb
index 6601d28f60..41001be22c 100644
--- a/test/rdoc/test_rdoc_parser_c.rb
+++ b/test/rdoc/test_rdoc_parser_c.rb
@@ -1930,6 +1930,22 @@ void d(void) { https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_parser_c.rb#L1930
                  @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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]