require "spec_helper"
require "nokogiri"
RSpec.describe IsoDoc do
it "cleans up admonitions" do
expect(xmlpp(IsoDoc::WordConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s)).to be_equivalent_to xmlpp(<<~"OUTPUT")
INPUT
OUTPUT
end
it "cleans up figures" do
expect(xmlpp(IsoDoc::HtmlConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s)).to be_equivalent_to xmlpp(<<~"OUTPUT")
INPUT
OUTPUT
end
it "cleans up figures (Word)" do
expect(xmlpp(IsoDoc::WordConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s)).to be_equivalent_to xmlpp(<<~"OUTPUT")
INPUT
OUTPUT
end
it "cleans up inline headers" do
expect(xmlpp(IsoDoc::WordConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s)).to be_equivalent_to xmlpp(<<~"OUTPUT")
test
4. Clause 4
4.1. Introduction
4.2. Clause 4.2
INPUT
test
4. Clause 4
4.1. Introduction
OUTPUT
end
it "cleans up footnotes" do
expect(xmlpp(IsoDoc::HtmlConvert.new({}).cleanup(Nokogiri::XML(<<~"INPUT")).to_s)).to be_equivalent_to xmlpp(<<~"OUTPUT")
#{HTML_HDR}