require "spec_helper"
RSpec.describe IsoDoc do
it "processes document with no content" do
expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
INPUT
OUTPUT
end
it "processes section names" do
expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
Foreword
Foreword
This is a preamble
Introduction
Introduction Subsection
Scope
Text
Terms, Definitions, Symbols and Abbreviated Terms
Normal Terms
Term2
- Symbol
- Definition
- Symbol
- Definition
Clause 4
Introduction
Clause 4.2
Annex
Annex A.1
Annex A.1a
Normative References
Bibliography
Bibliography Subsection
INPUT
#{HTML_HDR}
Abstract
Foreword
This is a preamble
Introduction
Introduction Subsection
2. Normative references
There are no normative references in this document.
3. Terms, definitions, symbols and abbreviated terms
For the purposes of this document,
the following terms and definitions apply.
ISO and IEC maintain terminological databases for use in
standardization at the following addresses:
3.1. Normal Terms
3.1.1
Term2
3.2. Symbols and abbreviated terms
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
Bibliography
Bibliography Subsection