require "spec_helper" require "relaton_iec" require "fileutils" RSpec.describe Asciidoctor::Standoc do it "processes svgmap" do FileUtils.cp "spec/fixtures/action_schemaexpg1.svg", "action_schemaexpg1.svg" FileUtils.cp "spec/fixtures/action_schemaexpg1.svg", "action_schemaexpg2.svg" input = <<~INPUT #{ASCIIDOC_BLANK_HDR} [svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true] ==== * <>; http://www.example.com ==== [[ref1]] .SVG title [.svgmap] ==== image::action_schemaexpg1.svg[] * <>; mn://action_schema * http://www.example.com[Phone]; http://www.example.com ==== [[ref2]] [svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true] ==== [alt=Workmap] image::action_schemaexpg2.svg[] * <>; mn://action_schema * http://www.example.com[Phone]; mn://basic_attribute_schema * <>; mn://support_resource_schema ==== INPUT output = <<~OUTPUT #{BLANK_HDR} Computer
SVG title
action_schema.basic Coffee
OUTPUT expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))) .gsub(%r{}m, "") .gsub(%r{}m, "