metanorma-iso 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ RSpec.describe Asciidoctor::ISO do
16
16
  List F:: List G
17
17
 
18
18
  INPUT
19
- expect(strip_guid(output)).to be_equivalent_to <<~"OUTPUT"
19
+ expect(xmlpp(strip_guid(output))).to be_equivalent_to xmlpp(<<~"OUTPUT")
20
20
  #{BLANK_HDR}
21
21
  <sections>
22
22
  <ul id="_">
@@ -98,7 +98,7 @@ RSpec.describe Asciidoctor::ISO do
98
98
  Note 3.
99
99
 
100
100
  INPUT
101
- expect(strip_guid(output)).to be_equivalent_to <<~"OUTPUT"
101
+ expect(xmlpp(strip_guid(output))).to be_equivalent_to xmlpp(<<~"OUTPUT")
102
102
  #{BLANK_HDR}
103
103
  <sections><ul id="id">
104
104
  <li>
@@ -165,7 +165,7 @@ RSpec.describe Asciidoctor::ISO do
165
165
  end
166
166
 
167
167
  it "anchors lists and list items" do
168
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
168
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
169
169
  #{ASCIIDOC_BLANK_HDR}
170
170
  [[id1]]
171
171
  * [[id2]] List item
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::ISO do
4
4
  it "processes the Asciidoctor::ISO inline macros" do
5
- expect(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)).to be_equivalent_to <<~"OUTPUT"
5
+ expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
  alt:[term1]
8
8
  deprecated:[term1]
@@ -6,7 +6,7 @@ RSpec.describe Asciidoctor::ISO do
6
6
  it "processes draft ISO reference" do
7
7
  #stub_fetch_ref no_year: true, note: "The standard is in press"
8
8
 
9
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
9
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
10
10
  #{ASCIIDOC_BLANK_HDR}
11
11
  [bibliography]
12
12
  == Normative References
@@ -42,7 +42,7 @@ RSpec.describe Asciidoctor::ISO do
42
42
  it "processes all-parts ISO reference" do
43
43
  #stub_fetch_ref(all_parts: true)
44
44
 
45
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
45
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
46
46
  #{ASCIIDOC_BLANK_HDR}
47
47
  [bibliography]
48
48
  == Normative References
@@ -76,7 +76,7 @@ RSpec.describe Asciidoctor::ISO do
76
76
  end
77
77
 
78
78
  it "processes non-ISO reference in Normative References" do
79
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
79
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
80
80
  #{ASCIIDOC_BLANK_HDR}
81
81
  [bibliography]
82
82
  == Normative References
@@ -102,7 +102,7 @@ RSpec.describe Asciidoctor::ISO do
102
102
  end
103
103
 
104
104
  it "processes non-ISO reference in Bibliography" do
105
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
105
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
106
106
  #{ASCIIDOC_BLANK_HDR}
107
107
  [bibliography]
108
108
  == Bibliography
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::ISO do
4
4
  it "processes sections" do
5
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
5
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
  .Foreword
8
8
 
@@ -123,7 +123,7 @@ standardization at the following addresses:</p>
123
123
  end
124
124
 
125
125
  it "processes sections with title attributes" do
126
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
126
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
127
127
  #{ASCIIDOC_BLANK_HDR}
128
128
  .Foreword
129
129
 
@@ -212,49 +212,59 @@ standardization at the following addresses:</p>
212
212
  <preferred>Term1</preferred>
213
213
  </term>
214
214
  </terms>
215
- <clause id="_" obligation="normative"><title>Terms and definitions</title><terms id="_" obligation="normative">
216
- <title>Normal Terms</title>
217
- <term id="_">
218
- <preferred>Term2</preferred>
219
- </term>
220
- </clause>
221
- <definitions id="_">
222
- <title>Σύμβολα και Συντομογραφίες</title>
223
- </definitions>
224
- </terms>
225
- <definitions id="_">
226
- <title>Σύμβολα και Συντομογραφίες</title>
227
- </definitions>
228
- <clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
229
- <title>Introduction</title>
230
- </clause>
231
- <clause id="_" inline-header="false" obligation="normative">
232
- <title>Clause 4.2</title>
233
- </clause></clause>
234
-
235
- </sections><annex id="_" inline-header="false" obligation="normative">
236
- <title>Annex</title>
237
- <clause id="_" inline-header="false" obligation="normative">
238
- <title>Annex A.1</title>
239
- </clause>
240
- <appendix id="_" inline-header="false" obligation="normative">
241
- <title>Appendx 1</title>
242
- </appendix></annex><bibliography><references id="_" obligation="informative">
243
- <title>Normative References</title>
244
- <p>There are no normative references in this document.</p>
245
- </references><clause id="_" obligation="informative">
246
- <title>Bibliography</title>
247
- <references id="_" obligation="informative">
248
- <title>Bibliography Subsection</title>
249
- </references>
250
- </clause>
251
- </bibliography>
215
+ <clause id='_' obligation='normative'>
216
+ <title>Terms and definitions</title>
217
+ <terms id='_' obligation='normative'>
218
+ <title>Normal Terms</title>
219
+ <term id='_'>
220
+ <preferred>Term2</preferred>
221
+ </term>
222
+ </terms>
223
+ <definitions id='_'>
224
+ <title>Σύμβολα και Συντομογραφίες</title>
225
+ </definitions>
226
+ </clause>
227
+ <definitions id='_'>
228
+ <title>Σύμβολα και Συντομογραφίες</title>
229
+ </definitions>
230
+ <clause id='_' inline-header='false' obligation='normative'>
231
+ <title>Clause 4</title>
232
+ <clause id='_' inline-header='false' obligation='normative'>
233
+ <title>Introduction</title>
234
+ </clause>
235
+ <clause id='_' inline-header='false' obligation='normative'>
236
+ <title>Clause 4.2</title>
237
+ </clause>
238
+ </clause>
239
+ </sections>
240
+ <annex id='_' inline-header='false' obligation='normative'>
241
+ <title>Annex</title>
242
+ <clause id='_' inline-header='false' obligation='normative'>
243
+ <title>Annex A.1</title>
244
+ </clause>
245
+ <appendix id='_' inline-header='false' obligation='normative'>
246
+ <title>Appendx 1</title>
247
+ </appendix>
248
+ </annex>
249
+ <bibliography>
250
+ <references id='_' obligation='informative'>
251
+ <title>Normative References</title>
252
+ <p>There are no normative references in this document.</p>
253
+ </references>
254
+ <clause id='_' obligation='informative'>
255
+ <title>Bibliography</title>
256
+ <references id='_' obligation='informative'>
257
+ <title>Bibliography Subsection</title>
258
+ </references>
259
+ </clause>
260
+ </bibliography>
252
261
  </iso-standard>
262
+
253
263
  OUTPUT
254
264
  end
255
265
 
256
266
  it "processes section obligations" do
257
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
267
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
258
268
  #{ASCIIDOC_BLANK_HDR}
259
269
  [obligation=informative]
260
270
  == Clause 1
@@ -285,7 +295,7 @@ standardization at the following addresses:</p>
285
295
  end
286
296
 
287
297
  it "processes inline headers" do
288
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
298
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
289
299
  #{ASCIIDOC_BLANK_HDR}
290
300
  == Clause 1
291
301
 
@@ -316,7 +326,7 @@ standardization at the following addresses:</p>
316
326
  end
317
327
 
318
328
  it "processes blank headers" do
319
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
329
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
320
330
  #{ASCIIDOC_BLANK_HDR}
321
331
  == Clause 1
322
332
 
@@ -336,7 +346,7 @@ standardization at the following addresses:</p>
336
346
  end
337
347
 
338
348
  it "processes terms & definitions with external source" do
339
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
349
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
340
350
  #{ASCIIDOC_BLANK_HDR}
341
351
 
342
352
  Foreword
@@ -370,13 +380,13 @@ standardization at the following addresses:</p>
370
380
  <preferred>Term1</preferred>
371
381
  </term>
372
382
  </terms></sections>
373
- </standard-document>
383
+ </iso-standard>
374
384
 
375
385
  OUTPUT
376
386
  end
377
387
 
378
388
  it "processes empty terms & definitions" do
379
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
389
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
380
390
  #{ASCIIDOC_BLANK_HDR}
381
391
 
382
392
  Foreword
@@ -403,13 +413,13 @@ standardization at the following addresses:</p>
403
413
  </p> </li> </ul>
404
414
 
405
415
  </terms></sections>
406
- </iso-document>
416
+ </iso-standard>
407
417
 
408
418
  OUTPUT
409
419
  end
410
420
 
411
421
  it "processes empty terms & definitions with external source" do
412
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
422
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
413
423
  #{ASCIIDOC_BLANK_HDR}
414
424
 
415
425
  Foreword
@@ -441,7 +451,7 @@ standardization at the following addresses:</p>
441
451
 
442
452
 
443
453
  </terms></sections>
444
- </iso-document>
454
+ </iso-standard>
445
455
 
446
456
  OUTPUT
447
457
  end
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::ISO do
4
4
  it "processes basic tables" do
5
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
5
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
  .Table Name
8
8
  |===
@@ -36,7 +36,7 @@ RSpec.describe Asciidoctor::ISO do
36
36
  end
37
37
 
38
38
  it "inserts header rows in a table with a name and no header" do
39
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
39
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
40
40
  #{ASCIIDOC_BLANK_HDR}
41
41
  [headerrows=2]
42
42
  .Table Name
@@ -76,7 +76,7 @@ RSpec.describe Asciidoctor::ISO do
76
76
 
77
77
 
78
78
  it "inserts header rows in a table without a name and no header" do
79
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
79
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
80
80
  #{ASCIIDOC_BLANK_HDR}
81
81
  [headerrows=2]
82
82
  |===
@@ -112,7 +112,7 @@ RSpec.describe Asciidoctor::ISO do
112
112
  end
113
113
 
114
114
  it "processes complex tables" do
115
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
115
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
116
116
  #{ASCIIDOC_BLANK_HDR}
117
117
  [cols="<,^,^,^,^",options="header,footer",headerrows=2]
118
118
  .Maximum permissible mass fraction of defects
@@ -970,4 +970,16 @@ it "Warn if term citation in Terms & Definitions not preceded with italicised te
970
970
  The definition of a term (<<term>>) is a part of the specialized vocabulary of a particular field
971
971
  INPUT
972
972
  end
973
+
974
+ it "Warn if an undated reference has no associated footnote" do
975
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Reference ISO8 does not have an associated footnote indicating unpublished status}).to_stderr
976
+ #{VALIDATING_BLANK_HDR}
977
+
978
+ [bibliography]
979
+ == Bibliography
980
+ * [[[ISO8,ISO 8:--]]], _Title_
981
+ INPUT
982
+ end
983
+
984
+
973
985
  end
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
4
  it "processes English" do
5
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
5
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  <iso-standard xmlns="http://riboseinc.com/isoxml">
7
7
  <bibdata>
8
8
  <language>en</language>
@@ -148,7 +148,7 @@ RSpec.describe IsoDoc do
148
148
  end
149
149
 
150
150
  it "defaults to English" do
151
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
151
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
152
152
  <iso-standard xmlns="http://riboseinc.com/isoxml">
153
153
  <bibdata>
154
154
  <language>tlh</language>
@@ -294,7 +294,7 @@ RSpec.describe IsoDoc do
294
294
  end
295
295
 
296
296
  it "processes French" do
297
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
297
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
298
298
  <iso-standard xmlns="http://riboseinc.com/isoxml">
299
299
  <bibdata>
300
300
  <language>fr</language>
@@ -440,7 +440,7 @@ RSpec.describe IsoDoc do
440
440
  end
441
441
 
442
442
  it "processes Simplified Chinese" do
443
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
443
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
444
444
  <iso-standard xmlns="http://riboseinc.com/isoxml">
445
445
  <bibdata>
446
446
  <language>zh</language>
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
4
  it "processes inline formatting" do
5
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
5
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  <iso-standard xmlns="http://riboseinc.com/isoxml">
7
7
  <preface><foreword>
8
8
  <p>
@@ -32,7 +32,7 @@ RSpec.describe IsoDoc do
32
32
  end
33
33
 
34
34
  it "processes links" do
35
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
35
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
36
36
  <iso-standard xmlns="http://riboseinc.com/isoxml">
37
37
  <preface><foreword>
38
38
  <p>
@@ -64,7 +64,7 @@ RSpec.describe IsoDoc do
64
64
  end
65
65
 
66
66
  it "processes unrecognised markup" do
67
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
67
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
68
68
  <iso-standard xmlns="http://riboseinc.com/isoxml">
69
69
  <preface><foreword>
70
70
  <p>
@@ -90,7 +90,7 @@ RSpec.describe IsoDoc do
90
90
  end
91
91
 
92
92
  it "processes AsciiMath and MathML" do
93
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
93
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true).sub(/<html/, "<html xmlns:m='m'"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
94
94
  <iso-standard xmlns="http://riboseinc.com/isoxml">
95
95
  <preface><foreword>
96
96
  <p>
@@ -102,7 +102,7 @@ RSpec.describe IsoDoc do
102
102
  <sections>
103
103
  </iso-standard>
104
104
  INPUT
105
- #{HTML_HDR}
105
+ #{HTML_HDR.sub(/<html/, "<html xmlns:m='m'")}
106
106
  <br/>
107
107
  <div>
108
108
  <h1 class="ForewordTitle">Foreword</h1>
@@ -122,7 +122,7 @@ RSpec.describe IsoDoc do
122
122
  end
123
123
 
124
124
  it "overrides AsciiMath delimiters" do
125
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
125
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
126
126
  <iso-standard xmlns="http://riboseinc.com/isoxml">
127
127
  <preface><foreword>
128
128
  <p>
@@ -150,7 +150,7 @@ RSpec.describe IsoDoc do
150
150
  end
151
151
 
152
152
  it "processes eref types" do
153
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
153
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
154
154
  <iso-standard xmlns="http://riboseinc.com/isoxml">
155
155
  <preface><foreword>
156
156
  <p>
@@ -194,7 +194,7 @@ RSpec.describe IsoDoc do
194
194
  end
195
195
 
196
196
  it "processes eref content" do
197
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
197
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
198
198
  <iso-standard xmlns="http://riboseinc.com/isoxml">
199
199
  <preface><foreword>
200
200
  <p>
@@ -88,7 +88,7 @@ RSpec.describe IsoDoc::Iso do
88
88
  end
89
89
 
90
90
  it "does not include IEV in references" do
91
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
91
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
92
92
  <iso-standard xmlns="http://riboseinc.com/isoxml">
93
93
  <preface><foreword>
94
94
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
@@ -164,7 +164,7 @@ RSpec.describe IsoDoc::Iso do
164
164
  end
165
165
 
166
166
  it "processes examples" do
167
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
167
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
168
168
  <iso-standard xmlns="http://riboseinc.com/isoxml">
169
169
  <preface><foreword>
170
170
  <example id="samplecode">
@@ -191,7 +191,7 @@ end
191
191
 
192
192
 
193
193
  it "processes sequences of examples" do
194
- expect(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
194
+ expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
195
195
  <iso-standard xmlns="http://riboseinc.com/isoxml">
196
196
  <preface><foreword>
197
197
  <example id="samplecode">
@@ -224,7 +224,7 @@ end
224
224
  end
225
225
 
226
226
  it "processes examples (Word)" do
227
- expect(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body/m, "<body")).to be_equivalent_to <<~"OUTPUT"
227
+ expect(xmlpp(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
228
228
  <iso-standard xmlns="http://riboseinc.com/isoxml">
229
229
  <preface><foreword>
230
230
  <example id="samplecode">
@@ -262,13 +262,12 @@ end
262
262
  <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
263
263
  <div class="colophon"/>
264
264
  </body>
265
- </html>
266
265
  OUTPUT
267
266
  end
268
267
 
269
268
 
270
269
  it "processes sequences of examples (Word)" do
271
- expect(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body/m, "<body")).to be_equivalent_to <<~"OUTPUT"
270
+ expect(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")).to be_equivalent_to <<~"OUTPUT"
272
271
  <iso-standard xmlns="http://riboseinc.com/isoxml">
273
272
  <preface><foreword>
274
273
  <example id="samplecode">
@@ -313,7 +312,6 @@ end
313
312
  <br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
314
313
  <div class="colophon"/>
315
314
  </body>
316
- </html>
317
315
  OUTPUT
318
316
  end
319
317