-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for the convert_inline_callout() method.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
require 'minitest/autorun' | ||
require_relative 'helper' | ||
|
||
class InlineCalloutTest < Minitest::Test | ||
def test_callout_number_range | ||
xml = <<~EOF.chomp.to_dita | ||
.... | ||
1: <1> | ||
.... | ||
.... | ||
20: <20> | ||
.... | ||
.... | ||
21: <21> | ||
.... | ||
.... | ||
35: <35> | ||
.... | ||
.... | ||
36: <36> | ||
.... | ||
.... | ||
50: <50> | ||
.... | ||
EOF | ||
|
||
# Three ranges of symbols are used to cover numbers between 1 and 50: | ||
assert_xpath_equal xml, '1: ①', '//pre[contains(., "1:")]/text()' | ||
assert_xpath_equal xml, '20: ⑳', '//pre[contains(., "20:")]/text()' | ||
assert_xpath_equal xml, '21: ㉑', '//pre[contains(., "21:")]/text()' | ||
assert_xpath_equal xml, '35: ㉟', '//pre[contains(., "35:")]/text()' | ||
assert_xpath_equal xml, '36: ㊱', '//pre[contains(., "36:")]/text()' | ||
assert_xpath_equal xml, '50: ㊿', '//pre[contains(., "50:")]/text()' | ||
end | ||
end |