require "spec_helper"
RSpec.describe IsoDoc do
it "processes English" do
input = <<~"INPUT"
en
Foreword
See
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
presxml = <<~"PRESXML"
en
Foreword
See Clause 5
Introduction
Introduction Subsection
1.Scope
Text
3.Terms, definitions, symbols and abbreviated terms
3.1.Normal Terms
3.1.1.
Term2
3.2.
- Symbol
- Definition
4.
- Symbol
- Definition
5.Clause 4
5.1.Introduction
5.2.Clause 4.2
Annex A
(normative)
Annex
A.1.Annex A.1
A.1.1.Annex A.1a
2.Normative References
Bibliography
Bibliography Subsection
PRESXML
output = <<~"OUTPUT"
#{HTML_HDR}
Introduction
Introduction Subsection
2. Normative References
3. Terms, definitions, symbols and abbreviated terms
3.1. Normal Terms
3.1.1.
Term2
5. Clause 4
5.1. Introduction
5.2. Clause 4.2
Annex A
(normative)
Annex
A.1. Annex A.1
A.1.1. Annex A.1a
Bibliography
Bibliography Subsection