require "spec_helper" RSpec.describe IsoDoc do it "processes unlabelled notes (Presentation XML)" do expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")

These results are based on a study carried out on three different types of kernel.

INPUT NOTE

These results are based on a study carried out on three different types of kernel.

OUTPUT end it "processes unlabelled notes (HTML)" do expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") NOTE

These results are based on a study carried out on three different types of kernel.

INPUT #{HTML_HDR}

Foreword

NOTE  These results are based on a study carried out on three different types of kernel.

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

These results are based on a study carried out on three different types of kernel.

INPUT

 



Foreword

 


OUTPUT end context "disable inkscape" do it "converts SVG (Word) with inkscape disabled" do FileUtils.rm_rf "spec/assets/odf1.emf" allow(IsoDoc::WordFunction::Body).to receive(:inkscape_installed?).and_return(nil) allow_any_instance_of(IsoDoc::WordFunction::Body).to receive(:inkscape_installed?) expect(xmlpp(strip_guid(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true).gsub(/['"][^'".]+(?
INPUT

 



Foreword

 


OUTPUT end end it "processes examples (Presentation XML)" do expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") Title

Hello

Sample
INPUT EXAMPLE — Title

Hello

Sample
OUTPUT end it "processes examples (HTML)" do expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") EXAMPLE — Title

Hello

Sample
INPUT #{HTML_HDR}

Foreword

EXAMPLE — Title

Hello

  

Sample

OUTPUT end it "processes examples (Word)" do expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") EXAMPLE — Title

Hello

Sample INPUT

 



Foreword

EXAMPLE — Title

Hello

Sample

 


OUTPUT end it "processes sequences of examples" do expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")

Hello

Title

Hello

Hello

INPUT EXAMPLE 1

Hello

EXAMPLE 2 — Title

Hello

EXAMPLE

Hello

OUTPUT end it "processes sourcecode (Presentation XML)" do expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") Ruby code puts x Que? INPUT Figure 1 — Ruby code puts x Que? OUTPUT end it "processes sourcecode (HTML)" do expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") Figure 1 — Ruby code puts x Que? INPUT #{HTML_HDR}

Foreword


       
  puts x

Figure 1 — Ruby code

  
Que?

OUTPUT end it "processes sourcecode (Word)" do expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT") Figure 1 — Ruby code puts x Que? INPUT

 



Foreword

(#(r = 1 %)#)

where

(#(r)#)

is the repeatability limit.

NOTE   [durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.

(#(r = 1 %)#)   (1)

 


OUTPUT end it "processes paragraph attributes" do expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")

Vache Equipment
Fictitious
World

Justify

INPUT #{HTML_HDR}

Foreword

Vache Equipment
Fictitious
World

Justify

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

Vache Equipment
Fictitious
World

Justify

INPUT