require "spec_helper"
RSpec.describe IsoDoc do
it "processes English" do
input = <<~INPUT
1
en
international-standard
true
emc
Foreword
This is a preamble
Introduction
Introduction Subsection
This is patent boilerplate
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
An Appendix
Normative References
Bibliography
Bibliography Subsection
INPUT
presxml = <<~OUTPUT
1
en
international-standard
Norme international
International Standard
true
Norme horizontale
Horizontal Standard
emc
Publication fondamentale en CEM
Basic EMC Publication
Foreword
This is a preamble
0Introduction
0.1Introduction Subsection
This is patent boilerplate
1Scope
Text
3Terms, definitions, symbols and abbreviated terms
3.1Normal Terms
3.1.1
Term2
3.2
- Symbol
- Definition
4
- Symbol
- Definition
5Clause 4
5.1Introduction
5.2Clause 4.2
Annex A
(normative)
Annex
A.1Annex A.1
A.1.1Annex A.1a
Appendix 1An Appendix
2Normative References
Bibliography
Bibliography Subsection
OUTPUT
html = <<~OUTPUT
#{HTML_HDR}
FOREWORD
This is a preamble
0 Introduction
0.1 Introduction Subsection
This is patent boilerplate
#{IEC_TITLE1}
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
Appendix 1 An Appendix
Bibliography
Bibliography Subsection