Skip to content

Commit

Permalink
Update tests for #1247
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Dec 17, 2024
1 parent cbbf04d commit 40bde8b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
10 changes: 5 additions & 5 deletions test/rdoc/support/text_formatter_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ def test_accept_paragraph_wrap
# Test case that calls <tt>@to.accept_table</tt>

def test_accept_table_align
header = ['AA', 'BB', 'CCCCC']
header = ['AA', 'BB', 'CCCCC', 'DDDDD']
body = [
['', 'bbb', 'c'],
['aaaa', 'b', ''],
['a', '', 'cc']
['', 'bbb', 'c', ''],
['aaaa', 'b', '', 'dd'],
['a', '', 'cc', 'dd']
]
aligns = [nil, :left, :right]
aligns = [nil, :left, :right, :center]
@to.start_accepting
@to.accept_table header, body, aligns

Expand Down
12 changes: 6 additions & 6 deletions test/rdoc/test_rdoc_markup_to_ansi.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require_relative 'helper'

class TestRDocMarkupToAnsi < RDoc::Markup::TextFormatterTestCase
class RDocMarkupToAnsiTest < RDoc::Markup::TextFormatterTestCase

add_visitor_tests
add_text_tests
Expand Down Expand Up @@ -350,11 +350,11 @@ def list_verbatim

def accept_table_align
expected = "\e[0m" + <<-EXPECTED
AA |BB |CCCCC
----|---|-----
|bbb| c
aaaa|b |
a | | cc
AA |BB |CCCCC|DDDDD
----|---|-----|-----
|bbb| c|
aaaa|b | | dd
a | | cc| dd
EXPECTED
assert_equal expected, @to.end_accepting
end
Expand Down
12 changes: 6 additions & 6 deletions test/rdoc/test_rdoc_markup_to_bs.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require_relative 'helper'

class TestRDocMarkupToBs < RDoc::Markup::TextFormatterTestCase
class RDocMarkupToBsTest < RDoc::Markup::TextFormatterTestCase

add_visitor_tests
add_text_tests
Expand Down Expand Up @@ -351,11 +351,11 @@ def list_verbatim

def accept_table_align
expected = <<-EXPECTED
AA |BB |CCCCC
----|---|-----
|bbb| c
aaaa|b |
a | | cc
AA |BB |CCCCC|DDDDD
----|---|-----|-----
|bbb| c|
aaaa|b | | dd
a | | cc| dd
EXPECTED
assert_equal expected, @to.end_accepting
end
Expand Down
12 changes: 6 additions & 6 deletions test/rdoc/test_rdoc_markup_to_markdown.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require_relative 'helper'

class TestRDocMarkupToMarkdown < RDoc::Markup::TextFormatterTestCase
class RDocMarkupToMarkdownTest < RDoc::Markup::TextFormatterTestCase

add_visitor_tests
add_text_tests
Expand Down Expand Up @@ -348,11 +348,11 @@ def list_verbatim

def accept_table_align
expected = <<-EXPECTED
AA |BB |CCCCC
----|---|-----
|bbb| c
aaaa|b |
a | | cc
AA |BB |CCCCC|DDDDD
----|---|-----|-----
|bbb| c|
aaaa|b | | dd
a | | cc| dd
EXPECTED
assert_equal expected, @to.end_accepting
end
Expand Down
12 changes: 6 additions & 6 deletions test/rdoc/test_rdoc_markup_to_rdoc.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require_relative 'helper'

class TestRDocMarkupToRDoc < RDoc::Markup::TextFormatterTestCase
class RDocMarkupToRDocTest < RDoc::Markup::TextFormatterTestCase

add_visitor_tests
add_text_tests
Expand Down Expand Up @@ -348,11 +348,11 @@ def list_verbatim

def accept_table_align
expected = <<-EXPECTED
AA |BB |CCCCC
----|---|-----
|bbb| c
aaaa|b |
a | | cc
AA |BB |CCCCC|DDDDD
----|---|-----|-----
|bbb| c|
aaaa|b | | dd
a | | cc| dd
EXPECTED
assert_equal expected, @to.end_accepting
end
Expand Down

0 comments on commit 40bde8b

Please sign in to comment.