diff options
Diffstat (limited to 'test/rdoc')
-rw-r--r-- | test/rdoc/test_rdoc_markdown.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_markdown.rb b/test/rdoc/test_rdoc_markdown.rb index ca76c34f43..4c45794343 100644 --- a/test/rdoc/test_rdoc_markdown.rb +++ b/test/rdoc/test_rdoc_markdown.rb @@ -1062,6 +1062,25 @@ and an extra note.[^2] assert_equal expected, doc end + def test_gfm_table_2 + doc = parse <<~MD + | Cmd | Returns | Meaning + |-----|---------|-------- + | "b" | boolean | True if file1 is a block device + | "c" | boolean | True if file1 is a character device + MD + + head = %w[Cmd Returns Meaning] + align = [nil, nil, nil] + body = [ + ['"b"', 'boolean', 'True if file1 is a block device'], + ['"c"', 'boolean', 'True if file1 is a character device'], + ] + expected = doc(@RM::Table.new(head, align, body)) + + assert_equal expected, doc + end + def parse text @parser.parse text end |