require "spec_helper" RSpec.describe IsoDoc do it "processes IsoXML footnotes" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

A.

Formerly denoted as 15 % (m/m).

B.

Formerly denoted as 15 % (m/m).

C.

Hello! denoted as 15 % (m/m).

INPUT #{HTML_HDR}

Foreword

A.2

B.2

C.1

OUTPUT end it "processes IsoXML footnotes (Word)" do expect(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

A.

Formerly denoted as 15 % (m/m).

B.

Formerly denoted as 15 % (m/m).

C.

Hello! denoted as 15 % (m/m).

INPUT

 



Foreword

A.2

B.2

C.1

 


OUTPUT end it "processes IsoXML reviewer notes" do system "rm -f test.html" IsoDoc::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)

A.

B.

A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.

For further information on the Foreword, see ISO/IEC Directives, Part 2, 2016, Clause 12.

C.

Second note.

Second note.

INPUT html = File.read("test.html").sub(/^.*.*$}m, "") expect(html).to be_equivalent_to <<~"OUTPUT"

 


 



Foreword

A.

B.

C.


Introduction

Second note.

A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.

For further information on the Foreword, see ISO/IEC Directives, Part 2, 2016, Clause 12.

Second note.

OUTPUT end it "processes IsoXML reviewer notes (Word)" do system "rm -f test.doc" IsoDoc::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)

A.

B.

A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.

For further information on the Foreword, see ISO/IEC Directives, Part 2, 2016, Clause 12.

C.

Second note.

Second note.

INPUT html = File.read("test.doc").sub(/^.*.*$}m, "") expect(html).to be_equivalent_to <<~"OUTPUT"

 



Foreword

A.

B.

C.


Introduction

 


Second note.

A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.

For further information on the Foreword, see ISO/IEC Directives, Part 2, 2016, Clause 12.

Second note.

OUTPUT end end