summaryrefslogtreecommitdiff
path: root/test/rdoc/support
diff options
context:
space:
mode:
authortomoya ishida <[email protected]>2024-10-03 21:27:39 +0900
committergit <[email protected]>2024-10-03 12:27:43 +0000
commit218445bb1fbda6b215b42e6149da672d330a7042 (patch)
tree857a806fb4856c0b8ed7b3c129ff6b9fc3df7833 /test/rdoc/support
parentb421964b9d00c685f11e1bcfdb2c0d9005e4f356 (diff)
[ruby/rdoc] Fix ToRdoc#accept_table
(https://github.com/ruby/rdoc/pull/1184) https://github.com/ruby/rdoc/commit/7b68545094
Diffstat (limited to 'test/rdoc/support')
-rw-r--r--test/rdoc/support/text_formatter_test_case.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rdoc/support/text_formatter_test_case.rb b/test/rdoc/support/text_formatter_test_case.rb
index e359028a29..9b3d7ed626 100644
--- a/test/rdoc/support/text_formatter_test_case.rb
+++ b/test/rdoc/support/text_formatter_test_case.rb
@@ -100,6 +100,23 @@ class RDoc::Markup::TextFormatterTestCase < RDoc::Markup::FormatterTestCase
end
##
+ # Test case that calls <tt>@to.accept_table</tt>
+
+ def test_accept_table_align
+ header = ['AA', 'BB', 'CCCCC']
+ body = [
+ ['', 'bbb', 'c'],
+ ['aaaa', 'b', ''],
+ ['a', '', 'cc']
+ ]
+ aligns = [nil, :left, :right]
+ @to.start_accepting
+ @to.accept_table header, body, aligns
+
+ accept_table_align
+ end
+
+ ##
# Test case that calls <tt>@to.attributes</tt> with an escaped
# cross-reference. If this test doesn't pass something may be very
# wrong.