require "spec_helper" RSpec.describe Asciidoctor::Iec do it "processes simple lists" do output = Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true) #{ASCIIDOC_BLANK_HDR} * List 1 * List 2 * List 3 . List A . List B . List C List D:: List E List F:: List G INPUT expect(xmlpp(strip_guid(output))).to be_equivalent_to xmlpp(<<~"OUTPUT") #{BLANK_HDR} OUTPUT end it "processes complex lists" do output = Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true) #{ASCIIDOC_BLANK_HDR} [[id]] * First * Second + -- entry1 entry2 -- [[id1]] [loweralpha] . First . Second [upperalpha] .. Third .. Fourth . Fifth . Sixth [lowerroman] . A . B [upperroman] .. C .. D [arabic] ... E ... F Notes1:: Notes:: Note 1. + Note 2. + Note 3. INPUT expect(xmlpp(strip_guid(output))).to be_equivalent_to xmlpp(<<~"OUTPUT") #{BLANK_HDR}
  1. First

  2. Second

    1. Third

    2. Fourth

  3. Fifth

  4. Sixth

  1. A

  2. B

    1. C

    2. D

      1. E

      2. F

        Notes1
        Notes

        Note 1.

        Note 2.

        Note 3.

OUTPUT end it "anchors lists and list items" do expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT") #{ASCIIDOC_BLANK_HDR} [[id1]] * [[id2]] List item * Hello [[id3]] List item INPUT #{BLANK_HDR} OUTPUT end end