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

Foreword

This is a preamble


Introduction

Introduction Subsection

1.  Scope

Text

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.

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


Bibliography

Bibliography Subsection

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

Foreword

This is a preamble


Introduction

Introduction Subsection

1.  Scope

Text

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.

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


Bibliography

Bibliography Subsection

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

Avant-propos

This is a preamble


Introduction

Introduction Subsection

1.  Domaine d'application

Text

2.  Références normatives

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

3.  Terms, définitions, symboles et termes abrégés

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

3.1. Normal Terms

3.1.1.

Term2

3.2. Symboles et termes abrégés

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


Bibliographie

Bibliography Subsection

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

This is a preamble

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

前言

This is a preamble


引言

Introduction Subsection

1.  范围

ISO 712、第1–1

2.  规范性引用文件

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

ISO 712, Cereals and cereal products

3.  术语、定义、符号、代号和缩略语

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

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


附件A
(规范性附录)

Annex

A.1. Annex A.1

A.1.1. Annex A.1a


参考文献

Bibliography Subsection

OUTPUT end end