diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-09-24 00:29:50 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2018-09-25 01:46:17 -0600 |
| commit | 0db74cd3de70192fbc0995b8471f96db6aedee3f (patch) | |
| tree | 63d406de5614b5e9ad92185338fa65e0230a102a /test | |
| parent | efa51c110b98eb47f7b8172512a21ec540045f4d (diff) | |
resolves #2871 (reprise) change autonumbered callout from <0> to <.>
Diffstat (limited to 'test')
| -rw-r--r-- | test/blocks_test.rb | 16 | ||||
| -rw-r--r-- | test/lists_test.rb | 14 |
2 files changed, 16 insertions, 14 deletions
diff --git a/test/blocks_test.rb b/test/blocks_test.rb index 23b858a9..be51bfd8 100644 --- a/test/blocks_test.rb +++ b/test/blocks_test.rb @@ -3094,20 +3094,22 @@ exit 0 # <5><6> [source, ruby] ---- -require 'coderay' # <0><0> +require 'coderay' # <.><.> -html = CodeRay.scan("puts 'Hello, world!'", :ruby).div(:line_numbers => :table) # <0> -puts html # <0> +html = CodeRay.scan("puts 'Hello, world!'", :ruby).div(:line_numbers => :table) # <.> +puts html # <.> ---- -<0> Load library -<0> Gem must be installed -<0> Highlight source -<0> Print to stdout +<.> Load library +<.> Gem must be installed +<.> Highlight source +<.> Print to stdout EOS output = convert_string_to_embedded input, :safe => Asciidoctor::SafeMode::SAFE assert_match(/<span class="content">coderay<\/span>.* <b class="conum">\(1\)<\/b> <b class="conum">\(2\)<\/b>$/, output) assert_match(/<span class="content">puts 'Hello, world!'<\/span>.* <b class="conum">\(3\)<\/b>$/, output) assert_match(/puts html * <b class="conum">\(4\)<\/b><\/code>/, output) + assert_css '.colist ol', output, 1 + assert_css '.colist ol li', output, 4 end test 'should restore callout marks to correct lines if source highlighter is coderay and table line numbering is enabled' do diff --git a/test/lists_test.rb b/test/lists_test.rb index 337accde..a7ec98e8 100644 --- a/test/lists_test.rb +++ b/test/lists_test.rb @@ -4403,17 +4403,17 @@ require 'asciidoctor' # \\<1> assert_xpath '//co', output, 0 end - test 'should autonumber <0> callouts' do + test 'should autonumber <.> callouts' do input = <<-EOS [source, ruby] ---- -require 'asciidoctor' # <0> -doc = Asciidoctor::Document.new('Hello, World!') # <0> -puts doc.convert # <0> +require 'asciidoctor' # <.> +doc = Asciidoctor::Document.new('Hello, World!') # <.> +puts doc.convert # <.> ---- -<0> Describe the first line -<0> Describe the second line -<0> Describe the third line +<.> Describe the first line +<.> Describe the second line +<.> Describe the third line EOS output = convert_string_to_embedded input pre_html = (xmlnodes_at_css 'pre', output)[0].inner_html |
