require "spec_helper" RSpec.describe Asciidoctor::BSI do before(:all) do @blank_hdr = blank_hdr_gen end it "does not introduce subheadings in normative references of one type" do expect(xmlpp(strip_guid(Nokogiri::XML(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)).at("//xmlns:bibliography").to_xml))).to be_equivalent_to xmlpp(<<~"OUTPUT") = Document title Author :docfile: test.adoc :nodoc: :no-isobib-cache: [bibliography] == Normative References * [[[ref4,REF4]]] REF4 * [[[ref6,REF6]]] REF6 [bibliography] == Bibliography * [[[ref5,REF5]]] REF5 INPUT Normative references

The following documents are referred to in the text in such a way that some or all of their content constitutes provisions of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

REF4 [N1] REF4 4 REF6 [N2] REF6 6
Bibliography

For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

REF5 [1] REF5 5
OUTPUT end it "sorts references" do VCR.use_cassette "multistandard" do expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT") = Document title Author :docfile: test.adoc :nodoc: :no-isobib-cache: <> <> <> <> <> <> <> [bibliography] == Normative References * [[[ref4,REF4]]] REF4 * [[[ref5,ISO 639:1967]]] REF5 * [[[ref6,REF6]]] REF6 * [[[ref7,IETF RFC 7749]]] REF7 [bibliography] == Bibliography * [[[ref1,REF1]]] REF1 * [[[ref2,ISO 15124]]] REF2 * [[[ref3,REF3]]] REF3 INPUT #{@blank_hdr} FOREWORD

Normative references

The following documents are referred to in the text in such a way that some or all of their content constitutes provisions of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

Standards publications #{Date.today} The “xml2rfc” Version 2 Vocabulary https://raw.githubusercontent.com/relaton/relaton-data-ietf/master/data/reference.RFC.7749.xml https://www.rfc-editor.org/info/rfc7749 RFC 7749 RFC7749 10.17487/RFC7749 2016-02 J. Reschke Internet Engineering Task Force IETF Internet Engineering Task Force IETF en This document defines the “xml2rfc” version 2 vocabulary: an XML-based language used for writing RFCs and Internet-Drafts.Version 2 represents the state of the vocabulary (as implemented by several tools and as used by the RFC Editor) around 2014.This document obsoletes RFC 2629. RFC 7749 Fremont, CA #{Date.today} Symbols for languages, countries and authorities Symbols for languages, countries and authorities https://www.iso.org/standard/4765.html https://www.iso.org/contents/data/standard/00/47/4765.detail.rss ISO/R 639:1967 urn:iso:std:iso-r:r:639:stage-95.99:ed-1:en 639 1967-11 International Organization for Standardization ISO www.iso.org 1 en 95 99 1967 ISO/R Geneva Other publications REF6 [N1] REF6 6 REF4 [N2] REF4 4
Bibliography Standards publications

For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

#{Date.today} Information technology International Standardized Profile FOD126 Open Document Format: Image Applications — Enhanced document structure — Character, raster graphics, and geometric graphics content architecture — Part 1: Document Application Profile (DAP) Information technology — International Standardized Profile FOD126 — Open Document Format: Image Applications — Enhanced document structure — Character, raster graphics, and geometric graphics content architecture — Part 1: Document Application Profile (DAP) https://www.iso.org/standard/26440.html https://www.iso.org/contents/data/standard/02/64/26440.detail.rss ISO/IEC ISP 15124-1:1998 urn:iso:std:iso-iec:isp:15124:-1:stage-95.99:ed-1:en 15124 1998-07 International Organization for Standardization ISO www.iso.org International Electrotechnical Commission IEC www.iec.ch 1 en 95 99 1998 ISO/IEC Geneva
Other publications REF3 [1] REF3 3 REF1 [2] REF1 1
OUTPUT end end end