diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-04-21 01:01:13 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2018-04-22 23:40:05 -0600 |
| commit | b48709271c2c0f7a7bb7b5a999f12ae6c4f46251 (patch) | |
| tree | 8a007cd2b7b8dc762088dda8b156b6769f86624e /test/sections_test.rb | |
| parent | 6ceda95d640d677ec15fb4ecd02451b7671b3259 (diff) | |
resolves #2298 add numbering for parts
- number parts using roman numerals if the partnums attribute is set
- move method to convert integer to roman to Helpers module
- assign the value "Part" to the part-refsig attribute by default
- define the part-label attribute in the attributes-en.adoc data file
- add support for partnums and sectnums=all to create_section helper in extensions
- add partnums and sectnums=all scenarios to test for create_section helper
Diffstat (limited to 'test/sections_test.rb')
| -rw-r--r-- | test/sections_test.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/sections_test.rb b/test/sections_test.rb index 7ca13906..dfdea842 100644 --- a/test/sections_test.rb +++ b/test/sections_test.rb @@ -1354,6 +1354,31 @@ text assert_xpath '//h3[@id="_section_2_2"][starts-with(text(), "2.2. ")]', output, 1 end + test 'should number parts when doctype is book and partnums attributes is set' do + input = <<-EOS += Book Title +:doctype: book +:sectnums: +:partnums: + += Language + +== Syntax + +content + += Processor + +== CLI + +content + EOS + + output = render_string input + assert_xpath '//h1[@id="_language"][text() = "I. Language"]', output, 1 + assert_xpath '//h1[@id="_processor"][text() = "II. Processor"]', output, 1 + end + test 'blocks should have level' do input = <<-EOS = Title |
