require "spec_helper"
RSpec.describe IsoDoc do
it "processes document with no content" do
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
INPUT
OUTPUT
end
it "processes section names" do
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
Copyright
License
Legal
Feedback
Foreword
Foreword
This is a preamble
Introduction
Introduction Subsection
Dedication
Note to reader
Acknowledgements
Initial note
Initial admonition
Scope
Text
Terms, Definitions, Symbols and Abbreviated Terms
Normal Terms
Term2
Definitions
- Symbol
- Definition
- Symbol
- Definition
Clause 4
Introduction
Clause 4.2
Annex
Annex A.1
Annex A.1a
Annex Bibliography
Normative References
Bibliography
Bibliography Subsection
INPUT
#{HTML_HDR}
Abstract
Foreword
This is a preamble
Introduction
Introduction Subsection
Dedication
Note to reader
Acknowledgements
WARNING
Initial admonition
2. Normative references
3. Terms, Definitions, Symbols and Abbreviated Terms
3.1. Normal Terms
3.1.1.
Term2
3.2. Definitions
Symbol
- Definition
4. Symbols and abbreviated terms
-
Symbol
- Definition
5. Clause 4
5.1. Introduction
5.2. Clause 4.2
5.3.
Annex A
(normative)
Annex
A.1. Annex A.1
A.1.1. Annex A.1a
A.1.2. Annex Bibliography
Annex B
(normative)
Bibliography
Bibliography Subsection