require "spec_helper" RSpec.describe IsoDoc do it "processes English" do expect(IsoDoc::Convert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" en 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 #{HTML_HDR}

Foreword

This is a preamble


0.  Introduction

0.1. Introduction Subsection

This is patent boilerplate

1.  Scope

Text

2.  Normative References

There are no normative references in this document.

3.  Terms and Definitions

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


Annex A
(normative)

Annex

A.1. Annex A.1

A.1.1. Annex A.1a

Appendix 1. An Appendix


Bibliography

Bibliography Subsection

OUTPUT end it "defaults to English" do expect(IsoDoc::Convert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" tlh 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 #{HTML_HDR}

Foreword

This is a preamble


0.  Introduction

0.1. Introduction Subsection

This is patent boilerplate

1.  Scope

Text

2.  Normative References

There are no normative references in this document.

3.  Terms and Definitions

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


Annex A
(normative)

Annex

A.1. Annex A.1

A.1.1. Annex A.1a

Appendix 1. An Appendix


Bibliography

Bibliography Subsection

OUTPUT end it "processes French" do expect(IsoDoc::Convert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" fr 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 #{HTML_HDR}

Avant-propos

This is a preamble


0.  Introduction

0.1. Introduction Subsection

This is patent boilerplate

1.  Domaine d'application

Text

2.  Références normatives

Le présent document ne contient aucune référence normative.

3.  Terms et définitions

Pour les besoins du présent document, les termes et définitions suivants s'appliquent.

L'ISO et l'IEC tiennent à jour des bases de données terminologiques destinées à être utilisées en normalisation, consultables aux adresses suivantes:

3.1. Normal Terms

3.1.1

Term2

3.2. Symbols and Abbreviated Terms

Symbol

Definition

4.  Symboles et termes abrégés

Symbol

Definition

5.  Clause 4

5.1. Introduction

5.2. Clause 4.2


Annexe A
(normative)

Annex

A.1. Annex A.1

A.1.1. Annex A.1a

Appendice 1. An Appendix


Bibliographie

Bibliography Subsection

OUTPUT end it "processes Simplified Chinese" do expect(IsoDoc::Convert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" zh Foreword

This is a preamble

Introduction Introduction Subsection

This is patent boilerplate

Scope

11

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 Cereals and cereal products ISO 712 ISO Bibliography Bibliography Subsection
INPUT #{HTML_HDR}

前言

This is a preamble


0.  引言

0.1. Introduction Subsection

This is patent boilerplate

1.  范围

ISO 712、第1–1

2.  规范性引用文件

下列文件对于本文件的应用是必不可少的。 凡是注日期的引用文件,仅注日期的版本适用于本文件。 凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。

ISO 712, Cereals and cereal products

3.  术语和定义

下列术语和定义适用于本文件。

ISO和IEC用于标准化的术语数据库地址如下:

3.1. Normal Terms

3.1.1

Term2

3.2. Symbols and Abbreviated Terms

Symbol

Definition

4.  符号、代号和缩略语

Symbol

Definition

5.  Clause 4

5.1. Introduction

5.2. Clause 4.2


附件A
(规范性附录)

Annex

A.1. Annex A.1

A.1.1. Annex A.1a

附录1. An Appendix


参考文献

Bibliography Subsection

OUTPUT end end