metanorma-iso 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -488,7 +488,7 @@ RSpec.describe Asciidoctor::ISO do
488
488
  <title>Normative References</title>
489
489
  <bibitem id="iso123" type="standard">
490
490
  <title format="text/plain">Standard</title>
491
- <docidentifier>ISO 123</docidentifier>
491
+ <docidentifier type="ISO">ISO 123</docidentifier>
492
492
  <contributor>
493
493
  <role type="publisher"/>
494
494
  <organization>
@@ -1,4 +1,5 @@
1
1
  require "spec_helper"
2
+ require "fileutils"
2
3
 
3
4
  RSpec.describe Asciidoctor::ISO do
4
5
 
@@ -136,6 +137,19 @@ it "warns that undated reference has locality" do
136
137
  INPUT
137
138
  end
138
139
 
140
+ it "do not warn that undated reference which is a bibliographic reference has locality" do
141
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(/undated reference \[1\] should not contain specific elements/).to_stderr
142
+ #{VALIDATING_BLANK_HDR}
143
+
144
+ == Scope
145
+ <<iso123,clause=1>>
146
+
147
+ [bibliography]
148
+ == Bibliography
149
+ * [[[iso123,1]]] _Standard_
150
+ INPUT
151
+ end
152
+
139
153
  it "do not warn that undated IEV reference has locality" do
140
154
  expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(/undated reference IEV should not contain specific elements/).to_stderr
141
155
  #{VALIDATING_BLANK_HDR}
@@ -803,75 +817,6 @@ it "validates document against ISO XML schema" do
803
817
  INPUT
804
818
  end
805
819
 
806
-
807
- it "Warning if terms mismatches IEV" do
808
- system "mv ~/.iev.pstore ~/.iev.pstore1"
809
- system "rm test.iev.pstore"
810
- mock_open_uri('103-01-02')
811
- expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Term "automation" does not match IEV 103-01-02 "functional"}).to_stderr
812
- = Document title
813
- Author
814
- :docfile: test.adoc
815
-
816
- [bibliography]
817
- == Normative References
818
- * [[[iev,IEV]]], _iev_
819
-
820
- == Terms and definitions
821
- === Automation
822
-
823
- [.source]
824
- <<iev,clause="103-01-02">>
825
- INPUT
826
- system "mv ~/.iev.pstore1 ~/.iev.pstore"
827
- end
828
-
829
- it "No warning if English term matches IEV" do
830
- system "mv ~/.iev.pstore ~/.iev.pstore1"
831
- system "rm test.iev.pstore"
832
- mock_open_uri('103-01-02')
833
- expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr
834
- = Document title
835
- Author
836
- :docfile: test.adoc
837
-
838
- [bibliography]
839
- == Normative References
840
- * [[[iev,IEV]]], _iev_
841
-
842
- == Terms and definitions
843
- === Functional
844
-
845
- [.source]
846
- <<iev,clause="103-01-02">>
847
- INPUT
848
- system "mv ~/.iev.pstore1 ~/.iev.pstore"
849
- end
850
-
851
- it "No warning if French term matches IEV" do
852
- system "mv ~/.iev.pstore ~/.iev.pstore1"
853
- system "rm test.iev.pstore"
854
- mock_open_uri('103-01-02')
855
- expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr
856
- = Document title
857
- Author
858
- :docfile: test.adoc
859
- :nodoc:
860
- :language: fr
861
-
862
- [bibliography]
863
- == Normative References
864
- * [[[iev,IEV]]], _iev_
865
-
866
- == Terms and definitions
867
- === Fonctionnelle, f
868
-
869
- [.source]
870
- <<iev,clause="103-01-02">>
871
- INPUT
872
- system "mv ~/.iev.pstore1 ~/.iev.pstore"
873
- end
874
-
875
820
  it "Warn if more than 7 levels of subclause" do
876
821
  expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Exceeds the maximum clause depth of 7}).to_stderr
877
822
  = Document title
data/spec/assets/iso.doc CHANGED
@@ -1,7 +1,7 @@
1
1
  MIME-Version: 1.0
2
- Content-Type: multipart/related; boundary="----=_NextPart_ae3d8762.8f8c.4cd3"
2
+ Content-Type: multipart/related; boundary="----=_NextPart_e655639d.0d2c.4738"
3
3
 
4
- ------=_NextPart_ae3d8762.8f8c.4cd3
4
+ ------=_NextPart_e655639d.0d2c.4738
5
5
  Content-Location: file:///C:/Doc/spec/assets/iso.htm
6
6
  Content-Type: text/html; charset="utf-8"
7
7
 
@@ -713,7 +713,7 @@ div.example {
713
713
  margin-left: 70.9pt;
714
714
  text-indent: -70.9pt; }
715
715
 
716
- p.example, li.example, div.example, td.example, td.example p {
716
+ p.example, li.example, div.example, td.example {
717
717
  margin: 0in;
718
718
  margin-bottom: .0001pt;
719
719
  mso-pagination: none;
@@ -818,11 +818,11 @@ Switzerland<p class="MsoNormal"></p></span></p>
818
818
  <p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes">&#xA0;</span>TOC
819
819
  \o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
820
820
  <span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
821
- <a href="#_Toc808706670">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
821
+ <a href="#_Toc98130048">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
822
822
  <span style="mso-tab-count:1 dotted">. </span>
823
823
  </span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
824
824
  <span style="mso-element:field-begin"></span></span>
825
- <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc808706670 \h </span>
825
+ <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc98130048 \h </span>
826
826
  <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
827
827
  <span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span></span></p>
828
828
 
@@ -855,7 +855,7 @@ Switzerland<p class="MsoNormal"></p></span></p>
855
855
  </html>
856
856
 
857
857
 
858
- ------=_NextPart_ae3d8762.8f8c.4cd3
858
+ ------=_NextPart_e655639d.0d2c.4738
859
859
  Content-Location: file:///C:/Doc/spec/assets/iso_files/filelist.xml
860
860
  Content-Transfer-Encoding: base64
861
861
  Content-Type: application/xml
@@ -865,7 +865,7 @@ ICAgICAgIDxvOk1haW5GaWxlIEhSZWY9Ii4uL3NwZWMvYXNzZXRzL2lzby5odG0iLz4gIDxvOkZp
865
865
  bGUgSFJlZj0iZmlsZWxpc3QueG1sIi8+CiAgPG86RmlsZSBIUmVmPSJoZWFkZXIuaHRtbCIvPgo8
866
866
  L3htbD4K
867
867
 
868
- ------=_NextPart_ae3d8762.8f8c.4cd3
868
+ ------=_NextPart_e655639d.0d2c.4738
869
869
  Content-Location: file:///C:/Doc/spec/assets/iso_files/header.html
870
870
  Content-Transfer-Encoding: base64
871
871
  Content-Type: text/html charset="utf-8"
@@ -1058,4 +1058,4 @@ cD4NCg0KPHAgY2xhc3M9TXNvRm9vdGVyPjxzcGFuIGxhbmc9RU4tQVUgc3R5bGU9J2ZvbnQtc2l6
1058
1058
  ZToxMC4wcHQ7Jz7CqQ0KJm5ic3A7Jm5ic3A74oCTIEFsbCByaWdodHMgcmVzZXJ2ZWQ8bzpwPjwv
1059
1059
  bzpwPjwvc3Bhbj48L3A+DQoNCjwvZGl2Pg0KDQoNCg0KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=
1060
1060
 
1061
- ------=_NextPart_ae3d8762.8f8c.4cd3--
1061
+ ------=_NextPart_e655639d.0d2c.4738--
@@ -33,6 +33,7 @@
33
33
  :table-caption: Table
34
34
  :example-caption: Figure
35
35
  :local-cache:
36
+ :data-uri-image:
36
37
 
37
38
  [[foreword]]
38
39
  .Foreword
@@ -695,7 +696,7 @@ end
695
696
 
696
697
  * [[[ISO2146,ISO 2146:1988]]], _ISO 2146_
697
698
 
698
- * [[[IEC61010-2,IEC 61010-2:1998]]], _Safety requirements for electric equipment for measurement, control, and laboratory use -- Part 2: Particular requirements for laboratory equipment for the heating of material_
699
+ * [[[IEC61010-2,IEC 61010-2]]], _Safety requirements for electric equipment for measurement, control, and laboratory use -- Part 2: Particular requirements for laboratory equipment for the heating of material_
699
700
 
700
701
  * [[[ref10,10]]] [smallcap]#Standard No I.C.C 167#. _Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method_ (see http://www.icc.or.at)
701
702
 
@@ -892,7 +892,7 @@ See <a href="#figureC-1">Figure 2</a>.
892
892
  <div class="sect3">
893
893
  <h4 id="">3.2.1. </h4>
894
894
  <div class="paragraph">
895
- <p>The mass fraction of moisture, determined in accordance with <a href="#ISO712">[ISO 712]</a>, using an oven complying with the requirements of <a href="#IEC61010-2">[IEC 61010-2:1998]</a>, shall not be greater than 15 %.<sup class="footnote">[<a id="_footnoteref_2" class="footnote" href="#_footnotedef_2" title="View footnote.">2</a>]</sup></p>
895
+ <p>The mass fraction of moisture, determined in accordance with <a href="#ISO712">[ISO 712]</a>, using an oven complying with the requirements of <a href="#IEC61010-2">[IEC 61010-2]</a>, shall not be greater than 15 %.<sup class="footnote">[<a id="_footnoteref_2" class="footnote" href="#_footnotedef_2" title="View footnote.">2</a>]</sup></p>
896
896
  </div>
897
897
  <div class="paragraph">
898
898
  <p>The mass fraction of extraneous matter and defective kernels in husked and milled rice, whether or not parboiled, determined in accordance with <a href="#AnnexA">Annex A</a>, shall not be greater than the values specified in <a href="#table1">Table 1</a>.</p>
@@ -1340,7 +1340,7 @@ Only use paddy or parboiled rice for the determination of husked rice yield.
1340
1340
  </div>
1341
1341
  <div id="figureA-1" class="imageblock">
1342
1342
  <div class="content">
1343
- <img src="rice_images/rice_image1.png" alt="rice image1">
1343
+ <img src="rice_img/rice_image1.png" alt="rice image1">
1344
1344
  </div>
1345
1345
  <div class="title">Figure 1. Split-it-right sample divider</div>
1346
1346
  </div>
@@ -1561,7 +1561,7 @@ Direct contact of iodine with skin can cause lesions so care should be taken in
1561
1561
  </div>
1562
1562
  <div id="figureC-1" class="imageblock">
1563
1563
  <div class="content">
1564
- <img src="rice_images/rice_image2.png" alt="rice image2">
1564
+ <img src="rice_img/rice_image2.png" alt="rice image2">
1565
1565
  </div>
1566
1566
  <div class="title">Figure 2. Typical gelatinization curve</div>
1567
1567
  </div>
@@ -1608,19 +1608,19 @@ These results are based on a study carried out on three different types of kerne
1608
1608
  <div class="content">
1609
1609
  <div class="imageblock">
1610
1610
  <div class="content">
1611
- <img src="rice_images/rice_image3_1.png" alt="rice image3 1">
1611
+ <img src="rice_img/rice_image3_1.png" alt="rice image3 1">
1612
1612
  </div>
1613
1613
  <div class="title">Figure 3. Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</div>
1614
1614
  </div>
1615
1615
  <div class="imageblock">
1616
1616
  <div class="content">
1617
- <img src="rice_images/rice_image3_2.png" alt="rice image3 2">
1617
+ <img src="rice_img/rice_image3_2.png" alt="rice image3 2">
1618
1618
  </div>
1619
1619
  <div class="title">Figure 4. Intermediate stages: Some fully gelatinized kernels are visible</div>
1620
1620
  </div>
1621
1621
  <div class="imageblock">
1622
1622
  <div class="content">
1623
- <img src="rice_images/rice_image3_3.png" alt="rice image3 3">
1623
+ <img src="rice_img/rice_image3_3.png" alt="rice image3 3">
1624
1624
  </div>
1625
1625
  <div class="title">Figure 5. Final stages: All kernels are fully gelatinized</div>
1626
1626
  </div>
@@ -1790,7 +1790,7 @@ end</code></pre>
1790
1790
  <p><a id="ISO2146"></a>[ISO 2146:1988], <em>ISO 2146</em></p>
1791
1791
  </li>
1792
1792
  <li>
1793
- <p><a id="IEC61010-2"></a>[IEC 61010-2:1998], <em>Safety requirements for electric equipment for measurement, control, and laboratory use&#8201;&#8212;&#8201;Part 2: Particular requirements for laboratory equipment for the heating of material</em></p>
1793
+ <p><a id="IEC61010-2"></a>[IEC 61010-2], <em>Safety requirements for electric equipment for measurement, control, and laboratory use&#8201;&#8212;&#8201;Part 2: Particular requirements for laboratory equipment for the heating of material</em></p>
1794
1794
  </li>
1795
1795
  <li>
1796
1796
  <p><a id="ref10"></a>[10] <span class="smallcap">Standard No I.C.C 167</span>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <a href="http://www.icc.or.at" class="bare">http://www.icc.or.at</a>)</p>
@@ -1847,7 +1847,7 @@ end</code></pre>
1847
1847
  </div>
1848
1848
  <div id="footer">
1849
1849
  <div id="footer-text">
1850
- Last updated 2018-08-19 19:05:52 AEST
1850
+ Last updated 2018-09-22 20:44:36 AEST
1851
1851
  </div>
1852
1852
  </div>
1853
1853
  <script type="text/x-mathjax-config">
@@ -1,7 +1,8 @@
1
1
  require "spec_helper"
2
+ require "fileutils"
2
3
 
3
4
  RSpec.describe IsoDoc::Iso do
4
- system "rm -f test.html"
5
+ FileUtils.rm_f "test.html"
5
6
  it "processes isodoc as ISO: HTML output" do
6
7
  IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", false)
7
8
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -19,7 +20,7 @@ RSpec.describe IsoDoc::Iso do
19
20
  end
20
21
 
21
22
  it "processes isodoc as ISO: alt HTML output" do
22
- system "rm -f test.html"
23
+ FileUtils.rm_f "test.html"
23
24
  IsoDoc::Iso::HtmlConvert.new({alt: true}).convert("test", <<~"INPUT", false)
24
25
  <iso-standard xmlns="http://riboseinc.com/isoxml">
25
26
  <preface><foreword>
@@ -36,7 +37,7 @@ RSpec.describe IsoDoc::Iso do
36
37
  end
37
38
 
38
39
  it "processes isodoc as ISO: Chinese HTML output" do
39
- system "rm -f test.html"
40
+ FileUtils.rm_f "test.html"
40
41
  IsoDoc::Iso::HtmlConvert.new({script: "Hans"}).convert("test", <<~"INPUT", false)
41
42
  <iso-standard xmlns="http://riboseinc.com/isoxml">
42
43
  <preface><foreword>
@@ -53,7 +54,7 @@ RSpec.describe IsoDoc::Iso do
53
54
  end
54
55
 
55
56
  it "processes isodoc as ISO: user nominated fonts" do
56
- system "rm -f test.html"
57
+ FileUtils.rm_f "test.html"
57
58
  IsoDoc::Iso::HtmlConvert.new({bodyfont: "Zapf Chancery", headerfont: "Comic Sans", monospacefont: "Andale Mono"}).convert("test", <<~"INPUT", false)
58
59
  <iso-standard xmlns="http://riboseinc.com/isoxml">
59
60
  <preface><foreword>
@@ -70,7 +71,7 @@ RSpec.describe IsoDoc::Iso do
70
71
  end
71
72
 
72
73
  it "processes isodoc as ISO: Word output" do
73
- system "rm -f test.doc"
74
+ FileUtils.rm_f "test.doc"
74
75
  IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", false)
75
76
  <iso-standard xmlns="http://riboseinc.com/isoxml">
76
77
  <preface><foreword>
@@ -1,9 +1,10 @@
1
1
  require "spec_helper"
2
+ require "fileutils"
2
3
 
3
4
  RSpec.describe IsoDoc do
4
5
  it "generates file based on string input" do
5
- system "rm -f test.doc"
6
- system "rm -f test.html"
6
+ FileUtils.rm_f "test.doc"
7
+ FileUtils.rm_f "test.html"
7
8
  IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", filename: "test"}).convert("test", <<~"INPUT", false)
8
9
  <iso-standard xmlns="http://riboseinc.com/isoxml">
9
10
  <bibdata>
@@ -28,8 +29,8 @@ RSpec.describe IsoDoc do
28
29
  end
29
30
 
30
31
  it "generates HTML output docs with null configuration" do
31
- system "rm -f test.doc"
32
- system "rm -f test.html"
32
+ FileUtils.rm_f "test.doc"
33
+ FileUtils.rm_f "test.html"
33
34
  IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
34
35
  <iso-standard xmlns="http://riboseinc.com/isoxml">
35
36
  <bibdata>
@@ -54,8 +55,8 @@ RSpec.describe IsoDoc do
54
55
  end
55
56
 
56
57
  it "generates Word output docs with null configuration" do
57
- system "rm -f test.doc"
58
- system "rm -f test.html"
58
+ FileUtils.rm_f "test.doc"
59
+ FileUtils.rm_f "test.html"
59
60
  IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
60
61
  <iso-standard xmlns="http://riboseinc.com/isoxml">
61
62
  <preface><foreword>
@@ -71,8 +72,8 @@ RSpec.describe IsoDoc do
71
72
  end
72
73
 
73
74
  it "generates HTML output docs with null configuration from file" do
74
- system "rm -f spec/assets/iso.doc"
75
- system "rm -f spec/assets/iso.html"
75
+ FileUtils.rm_f "spec/assets/iso.doc"
76
+ FileUtils.rm_f "spec/assets/iso.html"
76
77
  IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("spec/assets/iso.xml", nil, false)
77
78
  expect(File.exist?("spec/assets/iso.html")).to be true
78
79
  html = File.read("spec/assets/iso.html")
@@ -82,7 +83,7 @@ RSpec.describe IsoDoc do
82
83
  end
83
84
 
84
85
  it "generates Word output docs with null configuration from file" do
85
- system "rm -f spec/assets/iso.doc"
86
+ FileUtils.rm_f "spec/assets/iso.doc"
86
87
  IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("spec/assets/iso.xml", nil, false)
87
88
  expect(File.exist?("spec/assets/iso.doc")).to be true
88
89
  word = File.read("spec/assets/iso.doc")
@@ -91,8 +92,8 @@ RSpec.describe IsoDoc do
91
92
  end
92
93
 
93
94
  it "converts annex subheadings to h2Annex class for Word" do
94
- system "rm -f test.doc"
95
- system "rm -f test.html"
95
+ FileUtils.rm_f "test.doc"
96
+ FileUtils.rm_f "test.html"
96
97
  IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
97
98
  <iso-standard xmlns="http://riboseinc.com/isoxml">
98
99
  <annex id="P" inline-header="false" obligation="normative">
@@ -128,8 +129,8 @@ RSpec.describe IsoDoc do
128
129
  end
129
130
 
130
131
  it "populates Word template with terms reference labels" do
131
- system "rm -f test.doc"
132
- system "rm -f test.html"
132
+ FileUtils.rm_f "test.doc"
133
+ FileUtils.rm_f "test.html"
133
134
  IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
134
135
  <iso-standard xmlns="http://riboseinc.com/isoxml">
135
136
  <sections>
@@ -159,12 +160,11 @@ RSpec.describe IsoDoc do
159
160
  <p class="MsoNormal">ISO and IEC maintain terminological databases for use in
160
161
  standardization at the following addresses:</p>
161
162
 
162
- <ul>
163
- <li style="mso-list:l3 level1 lfo1;" class="MsoNormal"> <p class="MsoNormal">ISO Online browsing platform: available at
164
- <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
165
- <li style="mso-list:l3 level1 lfo1;" class="MsoNormal"> <p class="MsoNormal">IEC Electropedia: available at
163
+ <p style="mso-list:l3 level1 lfo1;" class="MsoListParagraphCxSpFirst"> ISO Online browsing platform: available at
164
+ <a href="http://www.iso.org/obp">http://www.iso.org/obp</a> </p>
165
+ <p style="mso-list:l3 level1 lfo1;" class="MsoListParagraphCxSpLast"> IEC Electropedia: available at
166
166
  <a href="http://www.electropedia.org">http://www.electropedia.org</a>
167
- </p> </li> </ul>
167
+ </p>
168
168
  <p class="TermNum"><a name="paddy1" id="paddy1"></a>1.1</p><p class="Terms" style="text-align:left;">paddy</p>
169
169
  <p class="MsoNormal"><a name="_eb29b35e-123e-4d1c-b50b-2714d41e747f" id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"></a>rice retaining its husk after threshing</p>
170
170
  <p class="MsoNormal">[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified &mdash; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p></div>
@@ -175,7 +175,7 @@ RSpec.describe IsoDoc do
175
175
  end
176
176
 
177
177
  it "populates Word header" do
178
- system "rm -f test.doc"
178
+ FileUtils.rm_f "test.doc"
179
179
  IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", header: "spec/assets/header.html"}).convert("test", <<~"INPUT", false)
180
180
  <iso-standard xmlns="http://riboseinc.com/isoxml">
181
181
  <bibdata type="article">
@@ -193,7 +193,7 @@ RSpec.describe IsoDoc do
193
193
  end
194
194
 
195
195
  it "populates Word ToC" do
196
- system "rm -f test.doc"
196
+ FileUtils.rm_f "test.doc"
197
197
  IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", wordintropage: "spec/assets/wordintro.html"}).convert("test", <<~"INPUT", false)
198
198
  <iso-standard xmlns="http://riboseinc.com/isoxml">
199
199
  <sections>
@@ -269,7 +269,7 @@ RSpec.describe IsoDoc do
269
269
  end
270
270
 
271
271
  it "reorders footnote numbers in HTML" do
272
- system "rm -f test.html"
272
+ FileUtils.rm_f "test.html"
273
273
  IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", wordintropage: "spec/assets/wordintro.html"}).convert("test", <<~"INPUT", false)
274
274
  <iso-standard xmlns="http://riboseinc.com/isoxml">
275
275
  <sections>
@@ -323,8 +323,8 @@ RSpec.describe IsoDoc do
323
323
  end
324
324
 
325
325
  it "moves images in HTML" do
326
- system "rm -f test.html"
327
- system "rm -rf _images"
326
+ FileUtils.rm_f "test.html"
327
+ FileUtils.rm_rf "_images"
328
328
  IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
329
329
  <iso-standard xmlns="http://riboseinc.com/isoxml">
330
330
  <preface><foreword>
@@ -358,8 +358,8 @@ RSpec.describe IsoDoc do
358
358
  end
359
359
 
360
360
  it "processes IsoXML terms for HTML" do
361
- system "rm -f test.doc"
362
- system "rm -f test.html"
361
+ FileUtils.rm_f "test.html"
362
+ FileUtils.rm_f "test.doc"
363
363
  IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
364
364
  <iso-standard xmlns="http://riboseinc.com/isoxml">
365
365
  <sections>
@@ -1,5 +1,6 @@
1
1
  require "spec_helper"
2
2
  require "metanorma"
3
+ require "fileutils"
3
4
 
4
5
  #RSpec.describe Asciidoctor::Gb do
5
6
  RSpec.describe Metanorma::Iso::Processor do
@@ -33,7 +34,7 @@ RSpec.describe Metanorma::Iso::Processor do
33
34
  end
34
35
 
35
36
  it "generates HTML from IsoDoc XML" do
36
- system "rm -f test.xml"
37
+ FileUtils.rm_f "test.xml"
37
38
  processor.output(<<~"INPUT", "test.html", :html)
38
39
  <iso-standard xmlns="http://riboseinc.com/isoxml">
39
40
  <sections>