require "spec_helper" require "fileutils" RSpec.describe Asciidoctor::Iec do before(:all) do @boilerplate = boilerplate(Nokogiri::XML(BLANK_HDR + "")) end it "generates reference boilerplate for IEV" do expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT") = Document title Author :docfile: test.adoc :nodoc: :novalid: :no-isobib: :docnumber: 60050 [bibliography] == Normative References * [[[A,B]]], _TITLE_ INPUT IEC 60050 ED 1 60050 International Electrotechnical Commission IEC International Electrotechnical Commission IEC en 60 60 #{Time.now.year} International Electrotechnical Commission IEC article false IEC 60050 International standard #{@boilerplate} Normative references

There are no normative references in this document.

TITLE B
OUTPUT end it "generates terms boilerplate for IEV" do expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT") = Document title Author :docfile: test.adoc :nodoc: :novalid: :no-isobib: :docnumber: 60050 == Terms and definitions === General ==== Term 1 INPUT IEC 60050 ED 1 60050 International Electrotechnical Commission IEC International Electrotechnical Commission IEC en 60 60 #{Time.now.year} International Electrotechnical Commission IEC article false IEC 60050 International standard #{@boilerplate} Terms and definitions General Term 1 OUTPUT end it "uses IEV introduction title" do expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT") = Document title Author :docfile: test.adoc :nodoc: :novalid: :no-isobib: :docnumber: 60050 == Introduction Text INPUT IEC 60050 ED 1 60050 International Electrotechnical Commission IEC International Electrotechnical Commission IEC en 60 60 #{Time.now.year} International Electrotechnical Commission IEC article false IEC 60050 International standard #{@boilerplate} INTRODUCTION<br/>Principles and rules followed

Text

OUTPUT end end