spec/isodoc/postproc_spec.rb in isodoc-0.7.0 vs spec/isodoc/postproc_spec.rb in isodoc-0.7.1
- old
+ new
@@ -221,11 +221,11 @@
word = File.read("test.doc").sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">').
sub(%r{<div style="mso-element:footnote-list"/>.*$}m, "")
expect(word).to be_equivalent_to <<~"OUTPUT"
<div class="WordSection3">
<p class="zzSTDTitle1"></p>
- <div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1>1.<span style="mso-tab-count:1">  </span>Terms and Definitions</h1><p class="MsoNormal">For the purposes of this document,
+ <div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1>1.<span style="mso-tab-count:1">  </span>Terms and definitions</h1><p class="MsoNormal">For the purposes of this document,
the following terms and definitions apply.</p>
<p class="MsoNormal">ISO and IEC maintain terminological databases for use in
standardization at the following addresses:</p>
<ul>
@@ -259,12 +259,12 @@
Content-Location: file:///C:/Doc/test_files/header.html
Content-Transfer-Encoding: base64
Content-Type: text/html charset="utf-8"
-Ci8qIGFuIGVtcHR5IGhlYWRlciAqLwoKU1RBUlQgRE9DIElEOiAxMDAwLTE6IEVORCBET0MgSUQK
-CkZJTEVOQU1FOiB0ZXN0Cgo=
+Ci8qIGFuIGVtcHR5IGhlYWRlciAqLwoKU1RBUlQgRE9DIElEOiB7eyBkb2NudW1iZXIgfX06IEVO
+RCBET0MgSUQKCkZJTEVOQU1FOiB7eyBmaWxlbmFtZSB9fQoK
OUTPUT
end
it "populates Word ToC" do
@@ -366,14 +366,14 @@
</fn></p>
</clause></clause>
</sections>
</iso-standard>
INPUT
- html = File.read("test.html").sub(/^.*<main class="WordSection3">/m, '<main class="WordSection3">').
+ html = File.read("test.html").sub(/^.*<main class="main-section">/m, '<main class="main-section">').
sub(%r{</main>.*$}m, "</main>")
expect(html).to be_equivalent_to <<~"OUTPUT"
- <main class="WordSection3"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
+ <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<p class="zzSTDTitle1"></p>
<div>
<h1>1.  Clause 4</h1>
<a rel="footnote" href="#fn:3" epub:type="footnote" id="fnref:1">
<sup>1</sup>
@@ -411,14 +411,14 @@
<image src="spec/assets/rice_image1.png" id="_" imagetype="PNG"/>
</figure>
</foreword></preface>
</iso-standard>
INPUT
- html = File.read("test.html").sub(/^.*<main class="WordSection3">/m, '<main class="WordSection3">').
+ html = File.read("test.html").sub(/^.*<main class="main-section">/m, '<main class="main-section">').
sub(%r{</main>.*$}m, "</main>")
expect(`ls _images`).to match(/\.png$/)
expect(html.gsub(/\/[0-9a-f-]+\.png/, "/_.png")).to be_equivalent_to <<~"OUTPUT"
- <main class="WordSection3"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
+ <main class="main-section"><button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<br />
<div>
<h1 class="ForewordTitle">Foreword</h1>
<div id="_" class="figure">