metanorma-iso 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::ISO do
4
4
  it "processes open blocks" 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
  --
8
8
  x
@@ -21,7 +21,7 @@ RSpec.describe Asciidoctor::ISO do
21
21
  end
22
22
 
23
23
  it "processes stem blocks" do
24
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
24
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
25
25
  #{ASCIIDOC_BLANK_HDR}
26
26
  [stem]
27
27
  ++++
@@ -42,7 +42,6 @@ RSpec.describe Asciidoctor::ISO do
42
42
 
43
43
  <formula id="_">
44
44
  <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
45
- </stem>
46
45
  </formula>
47
46
  </sections>
48
47
  </iso-standard>
@@ -50,7 +49,7 @@ RSpec.describe Asciidoctor::ISO do
50
49
  end
51
50
 
52
51
  it "ignores review blocks unless document is in draft mode" do
53
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
52
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
54
53
  #{ASCIIDOC_BLANK_HDR}
55
54
  [[foreword]]
56
55
  .Foreword
@@ -71,7 +70,7 @@ RSpec.describe Asciidoctor::ISO do
71
70
  end
72
71
 
73
72
  it "processes review blocks if document is in draft mode" do
74
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)).sub(/^.+<sections>/m, "")).to be_equivalent_to <<~"OUTPUT"
73
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)).sub(/^.+<sections>/m, "<iso-standard><sections>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
75
74
  = Document title
76
75
  Author
77
76
  :docfile: test.adoc
@@ -91,6 +90,7 @@ RSpec.describe Asciidoctor::ISO do
91
90
  For further information on the Foreword, see *ISO/IEC Directives, Part 2, 2016, Clause 12.*
92
91
  ****
93
92
  INPUT
93
+ <iso-standard><sections>
94
94
  <p id="foreword">Foreword</p>
95
95
  <review reviewer="ISO" id="_" date="20170101T00:00:00Z" from="foreword" to="foreword"><p id="_">A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
96
96
  <p id="_">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p></review></sections>
@@ -100,7 +100,7 @@ RSpec.describe Asciidoctor::ISO do
100
100
  end
101
101
 
102
102
  it "processes term notes" do
103
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
103
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
104
104
  #{ASCIIDOC_BLANK_HDR}
105
105
  == Terms and Definitions
106
106
 
@@ -126,7 +126,7 @@ RSpec.describe Asciidoctor::ISO do
126
126
  end
127
127
 
128
128
  it "processes notes" do
129
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
129
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
130
130
  #{ASCIIDOC_BLANK_HDR}
131
131
  NOTE: This is a note
132
132
  INPUT
@@ -142,7 +142,7 @@ RSpec.describe Asciidoctor::ISO do
142
142
  end
143
143
 
144
144
  it "processes literals" do
145
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
145
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
146
146
  #{ASCIIDOC_BLANK_HDR}
147
147
  ....
148
148
  LITERAL
@@ -159,7 +159,7 @@ RSpec.describe Asciidoctor::ISO do
159
159
  end
160
160
 
161
161
  it "processes simple admonitions with Asciidoc names" do
162
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
162
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
163
163
  #{ASCIIDOC_BLANK_HDR}
164
164
  CAUTION: Only use paddy or parboiled rice for the determination of husked rice yield.
165
165
  INPUT
@@ -176,7 +176,7 @@ RSpec.describe Asciidoctor::ISO do
176
176
 
177
177
 
178
178
  it "processes complex admonitions with non-Asciidoc names" do
179
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
179
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
180
180
  #{ASCIIDOC_BLANK_HDR}
181
181
  [CAUTION,type=Safety Precautions]
182
182
  .Safety Precautions
@@ -209,7 +209,7 @@ RSpec.describe Asciidoctor::ISO do
209
209
  end
210
210
 
211
211
  it "processes term examples" do
212
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
212
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
213
213
  #{ASCIIDOC_BLANK_HDR}
214
214
  == Terms and Definitions
215
215
 
@@ -237,7 +237,7 @@ RSpec.describe Asciidoctor::ISO do
237
237
  end
238
238
 
239
239
  it "processes examples" do
240
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
240
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
241
241
  #{ASCIIDOC_BLANK_HDR}
242
242
  [example]
243
243
  ====
@@ -256,7 +256,7 @@ RSpec.describe Asciidoctor::ISO do
256
256
  end
257
257
 
258
258
  it "processes preambles" do
259
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
259
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
260
260
  #{ASCIIDOC_BLANK_HDR}
261
261
  This is a preamble
262
262
 
@@ -275,7 +275,7 @@ RSpec.describe Asciidoctor::ISO do
275
275
  end
276
276
 
277
277
  it "processes images" do
278
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
278
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
279
279
  #{ASCIIDOC_BLANK_HDR}
280
280
  .Split-it-right sample divider
281
281
  image::spec/examples/rice_images/rice_image1.png[]
@@ -293,7 +293,7 @@ RSpec.describe Asciidoctor::ISO do
293
293
  end
294
294
 
295
295
  it "accepts width and height attributes on images" do
296
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
296
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
297
297
  #{ASCIIDOC_BLANK_HDR}
298
298
  [height=4,width=3]
299
299
  image::spec/examples/rice_images/rice_image1.png[]
@@ -310,7 +310,7 @@ RSpec.describe Asciidoctor::ISO do
310
310
  end
311
311
 
312
312
  it "accepts auto for width and height attributes on images" do
313
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
313
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
314
314
  #{ASCIIDOC_BLANK_HDR}
315
315
  [height=4,width=auto]
316
316
  image::spec/examples/rice_images/rice_image1.png[]
@@ -327,7 +327,7 @@ RSpec.describe Asciidoctor::ISO do
327
327
  end
328
328
 
329
329
  it "accepts alignment attribute on paragraphs" do
330
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
330
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
331
331
  #{ASCIIDOC_BLANK_HDR}
332
332
  [align=right]
333
333
  This para is right-aligned.
@@ -341,7 +341,7 @@ RSpec.describe Asciidoctor::ISO do
341
341
  end
342
342
 
343
343
  it "processes blockquotes" do
344
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
344
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
345
345
  #{ASCIIDOC_BLANK_HDR}
346
346
  [quote, ISO, "ISO7301,section 1"]
347
347
  ____
@@ -361,7 +361,7 @@ RSpec.describe Asciidoctor::ISO do
361
361
  end
362
362
 
363
363
  it "processes source code" do
364
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
364
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
365
365
  #{ASCIIDOC_BLANK_HDR}
366
366
  [source,ruby]
367
367
  --
@@ -383,7 +383,7 @@ RSpec.describe Asciidoctor::ISO do
383
383
  end
384
384
 
385
385
  it "processes callouts" do
386
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
386
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
387
387
  #{ASCIIDOC_BLANK_HDR}
388
388
  [source,ruby]
389
389
  --
@@ -410,7 +410,7 @@ RSpec.describe Asciidoctor::ISO do
410
410
  end
411
411
 
412
412
  it "processes unmodified term sources" do
413
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
413
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
414
414
  #{ASCIIDOC_BLANK_HDR}
415
415
  == Terms and Definitions
416
416
 
@@ -437,7 +437,7 @@ RSpec.describe Asciidoctor::ISO do
437
437
  end
438
438
 
439
439
  it "processes modified term sources" do
440
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
440
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
441
441
  #{ASCIIDOC_BLANK_HDR}
442
442
  == Terms and Definitions
443
443
 
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::ISO do
4
4
  it "removes empty text elements" 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
  == {blank}
8
8
  INPUT
@@ -17,7 +17,7 @@ RSpec.describe Asciidoctor::ISO do
17
17
  end
18
18
 
19
19
  it "processes stem-only terms as admitted" do
20
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
20
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
21
21
  #{ASCIIDOC_BLANK_HDR}
22
22
  == Terms and Definitions
23
23
 
@@ -41,7 +41,7 @@ RSpec.describe Asciidoctor::ISO do
41
41
  end
42
42
 
43
43
  it "moves term domains out of the term definition paragraph" do
44
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
44
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
45
45
  #{ASCIIDOC_BLANK_HDR}
46
46
  == Terms and Definitions
47
47
 
@@ -65,7 +65,7 @@ RSpec.describe Asciidoctor::ISO do
65
65
  end
66
66
 
67
67
  it "permits multiple blocks in term definition paragraph" do
68
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
68
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
69
69
  = Document title
70
70
  Author
71
71
  :docfile: test.adoc
@@ -101,7 +101,7 @@ RSpec.describe Asciidoctor::ISO do
101
101
  end
102
102
 
103
103
  it "strips any initial boilerplate from terms and definitions" do
104
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
104
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
105
105
  #{ASCIIDOC_BLANK_HDR}
106
106
  == Terms and Definitions
107
107
 
@@ -128,7 +128,7 @@ RSpec.describe Asciidoctor::ISO do
128
128
  end
129
129
 
130
130
  it "moves notes inside preceding blocks, if they are not at clause end, and the blocks are not delimited" do
131
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
131
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
132
132
  #{ASCIIDOC_BLANK_HDR}
133
133
  [stem]
134
134
  ++++
@@ -153,7 +153,7 @@ RSpec.describe Asciidoctor::ISO do
153
153
  end
154
154
 
155
155
  it "does not move notes inside preceding blocks, if they are at clause end" do
156
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
156
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
157
157
  #{ASCIIDOC_BLANK_HDR}
158
158
  [source,ruby]
159
159
  [1...x].each do |y|
@@ -174,7 +174,7 @@ RSpec.describe Asciidoctor::ISO do
174
174
  end
175
175
 
176
176
  it "converts xrefs to references into erefs" do
177
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
177
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
178
178
  #{ASCIIDOC_BLANK_HDR}
179
179
  <<iso216>>
180
180
 
@@ -207,13 +207,13 @@ RSpec.describe Asciidoctor::ISO do
207
207
  </contributor>
208
208
  </bibitem>
209
209
  </references>
210
- </bibliography
210
+ </bibliography>
211
211
  </iso-standard>
212
212
  OUTPUT
213
213
  end
214
214
 
215
215
  it "extracts localities from erefs" do
216
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
216
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
217
217
  #{ASCIIDOC_BLANK_HDR}
218
218
  <<iso216,whole,clause=3,example=9-11,locality:prelude=33,locality:entirety:the reference>>
219
219
 
@@ -250,7 +250,7 @@ RSpec.describe Asciidoctor::ISO do
250
250
 
251
251
 
252
252
  it "strips type from xrefs" do
253
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
253
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
254
254
  #{ASCIIDOC_BLANK_HDR}
255
255
  <<iso216>>
256
256
 
@@ -285,7 +285,7 @@ RSpec.describe Asciidoctor::ISO do
285
285
  end
286
286
 
287
287
  it "processes localities in term sources" do
288
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
288
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
289
289
  #{ASCIIDOC_BLANK_HDR}
290
290
  == Terms and Definitions
291
291
 
@@ -312,7 +312,7 @@ RSpec.describe Asciidoctor::ISO do
312
312
  end
313
313
 
314
314
  it "removes extraneous material from Normative References" do
315
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
315
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
316
316
  #{ASCIIDOC_BLANK_HDR}
317
317
  [bibliography]
318
318
  == Normative References
@@ -343,7 +343,7 @@ RSpec.describe Asciidoctor::ISO do
343
343
  end
344
344
 
345
345
  it "inserts IDs into paragraphs" do
346
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
346
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
347
347
  #{ASCIIDOC_BLANK_HDR}
348
348
  Paragraph
349
349
  INPUT
@@ -356,7 +356,7 @@ RSpec.describe Asciidoctor::ISO do
356
356
  end
357
357
 
358
358
  it "inserts IDs into notes" do
359
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
359
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
360
360
  #{ASCIIDOC_BLANK_HDR}
361
361
  [example]
362
362
  ====
@@ -376,7 +376,7 @@ RSpec.describe Asciidoctor::ISO do
376
376
  end
377
377
 
378
378
  it "moves table key inside table" do
379
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
379
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
380
380
  #{ASCIIDOC_BLANK_HDR}
381
381
  |===
382
382
  |a |b |c
@@ -408,7 +408,7 @@ RSpec.describe Asciidoctor::ISO do
408
408
  end
409
409
 
410
410
  it "processes headerrows attribute for table without header rows" do
411
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
411
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
412
412
  #{ASCIIDOC_BLANK_HDR}
413
413
  [headerrows=3]
414
414
  |===
@@ -447,7 +447,7 @@ RSpec.describe Asciidoctor::ISO do
447
447
  end
448
448
 
449
449
  it "processes headerrows attribute for table with header rows" do
450
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
450
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
451
451
  #{ASCIIDOC_BLANK_HDR}
452
452
  [headerrows=3]
453
453
  |===
@@ -492,7 +492,7 @@ RSpec.describe Asciidoctor::ISO do
492
492
  end
493
493
 
494
494
  it "moves table notes inside table" do
495
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
495
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
496
496
  #{ASCIIDOC_BLANK_HDR}
497
497
  |===
498
498
  |a |b |c
@@ -518,11 +518,12 @@ RSpec.describe Asciidoctor::ISO do
518
518
  </note></table>
519
519
 
520
520
  </sections>
521
+ </iso-standard>
521
522
  OUTPUT
522
523
  end
523
524
 
524
525
  it "moves formula key inside formula" do
525
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
526
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
526
527
  #{ASCIIDOC_BLANK_HDR}
527
528
  [stem]
528
529
  ++++
@@ -549,7 +550,7 @@ RSpec.describe Asciidoctor::ISO do
549
550
  end
550
551
 
551
552
  it "moves footnotes inside figures" do
552
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
553
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
553
554
  #{ASCIIDOC_BLANK_HDR}
554
555
  image::spec/examples/rice_images/rice_image1.png[]
555
556
 
@@ -573,7 +574,7 @@ RSpec.describe Asciidoctor::ISO do
573
574
  end
574
575
 
575
576
  it "moves figure key inside figure" do
576
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
577
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
577
578
  #{ASCIIDOC_BLANK_HDR}
578
579
  image::spec/examples/rice_images/rice_image1.png[]
579
580
 
@@ -598,7 +599,7 @@ RSpec.describe Asciidoctor::ISO do
598
599
  end
599
600
 
600
601
  it "numbers bibliographic notes and footnotes sequentially" do
601
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
602
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
602
603
  #{ASCIIDOC_BLANK_HDR}
603
604
  footnote:[Footnote]
604
605
 
@@ -650,7 +651,7 @@ RSpec.describe Asciidoctor::ISO do
650
651
  end
651
652
 
652
653
  it "defaults section obligations" do
653
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
654
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
654
655
  #{ASCIIDOC_BLANK_HDR}
655
656
 
656
657
  == Clause
@@ -675,7 +676,7 @@ RSpec.describe Asciidoctor::ISO do
675
676
  end
676
677
 
677
678
  it "extends clause levels past 5" do
678
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
679
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
679
680
  #{ASCIIDOC_BLANK_HDR}
680
681
 
681
682
  == Clause1
@@ -738,7 +739,7 @@ RSpec.describe Asciidoctor::ISO do
738
739
  end
739
740
 
740
741
  it "reorders references in bibliography, and renumbers citations accordingly" do
741
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
742
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
742
743
  #{ASCIIDOC_BLANK_HDR}
743
744
 
744
745
  == Clause 1
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::ISO do
4
4
  it "processes inline_quoted formatting" 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
  _emphasis_
8
8
  *strong*
@@ -41,7 +41,7 @@ RSpec.describe Asciidoctor::ISO do
41
41
  end
42
42
 
43
43
  it "processes breaks" do
44
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
44
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
45
45
  #{ASCIIDOC_BLANK_HDR}
46
46
  Line break +
47
47
  line break
@@ -60,7 +60,7 @@ RSpec.describe Asciidoctor::ISO do
60
60
  end
61
61
 
62
62
  it "processes links" do
63
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
63
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
64
64
  #{ASCIIDOC_BLANK_HDR}
65
65
  mailto:fred@example.com
66
66
  http://example.com[]
@@ -77,7 +77,7 @@ RSpec.describe Asciidoctor::ISO do
77
77
  end
78
78
 
79
79
  it "processes bookmarks" do
80
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
80
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
81
81
  #{ASCIIDOC_BLANK_HDR}
82
82
  Text [[bookmark]] Text
83
83
  INPUT
@@ -90,7 +90,7 @@ RSpec.describe Asciidoctor::ISO do
90
90
  end
91
91
 
92
92
  it "processes crossreferences" do
93
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
93
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
94
94
  #{ASCIIDOC_BLANK_HDR}
95
95
  [[reference]]
96
96
  == Section
@@ -115,7 +115,7 @@ RSpec.describe Asciidoctor::ISO do
115
115
  end
116
116
 
117
117
  it "processes bibliographic anchors" do
118
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
118
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
119
119
  #{ASCIIDOC_BLANK_HDR}
120
120
  [bibliography]
121
121
  == Normative References
@@ -145,7 +145,7 @@ RSpec.describe Asciidoctor::ISO do
145
145
  end
146
146
 
147
147
  it "processes footnotes" do
148
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
148
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
149
149
  #{ASCIIDOC_BLANK_HDR}
150
150
  Hello!footnote:[Footnote text]
151
151
  INPUT