metanorma-iec 1.3.13 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::Iec do
4
- before(:all) do
5
- @blank_hdr = blank_hdr_gen
6
- end
4
+ before(:all) do
5
+ @blank_hdr = blank_hdr_gen
6
+ end
7
7
 
8
8
  it "moves note from TC/SC officers to metadata" do
9
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
9
+ input = <<~INPUT
10
10
  #{ASCIIDOC_BLANK_HDR}
11
11
  == {blank}
12
12
 
@@ -19,173 +19,90 @@ end
19
19
  This document is also of interest for ISO/ TC114/ WG1 Requirements for Watch batteries
20
20
  ====
21
21
  INPUT
22
- <iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
23
- <bibdata type="standard">
24
- <contributor>
25
- <role type="author"/>
26
- <organization>
27
- <name>International Electrotechnical Commission</name>
28
- <abbreviation>IEC</abbreviation>
29
- </organization>
30
- </contributor>
31
- <contributor>
32
- <role type="publisher"/>
33
- <organization>
34
- <name>International Electrotechnical Commission</name>
35
- <abbreviation>IEC</abbreviation>
36
- </organization>
37
- </contributor>
38
- <language>en</language>
39
- <script>Latn</script>
40
- <status>
41
- <stage abbreviation="PPUB">60</stage>
42
- <substage abbreviation="PPUB">60</substage>
43
- </status>
44
- <copyright>
45
- <from>#{Time.new.year}</from>
46
- <owner>
47
- <organization>
48
- <name>International Electrotechnical Commission</name>
49
- <abbreviation>IEC</abbreviation>
50
- </organization>
51
- </owner>
52
- </copyright>
53
- <ext>
54
- <doctype>article</doctype>
55
- <horizontal>false</horizontal>
56
- <editorialgroup>
57
- <technical-committee/>
58
- <subcommittee/>
59
- <workgroup/>
60
- </editorialgroup>
61
- <stagename>International standard</stagename>
62
- <tc-sc-officers-note>
63
- <p id='_'>
64
- This FDIS is the result of the discussion between the IEC SC21A
65
- experts WG 3 during the meeting held in Chicago (USA) on April 9th
66
- </p>
67
- <p id='_'>
68
- This document is also of interest for ISO/ TC114/ WG1 Requirements for
69
- Watch batteries
70
- </p>
71
- </tc-sc-officers-note>
72
- </ext>
73
- </bibdata>
74
- #{boilerplate(Nokogiri::XML(BLANK_HDR + "</iec-standard>"))}
75
- <sections>
76
- <clause id="_" inline-header="false" obligation="normative">
77
-
78
- </clause>
79
- </sections>
80
- </iec-standard>
22
+ output = <<~OUTPUT
23
+ <iec-standard xmlns="https://www.metanorma.org/ns/iec" type="semantic" version="#{Metanorma::Iec::VERSION}">
24
+ <bibdata type="standard">
25
+ <contributor>
26
+ <role type="author"/>
27
+ <organization>
28
+ <name>International Electrotechnical Commission</name>
29
+ <abbreviation>IEC</abbreviation>
30
+ </organization>
31
+ </contributor>
32
+ <contributor>
33
+ <role type="publisher"/>
34
+ <organization>
35
+ <name>International Electrotechnical Commission</name>
36
+ <abbreviation>IEC</abbreviation>
37
+ </organization>
38
+ </contributor>
39
+ <language>en</language>
40
+ <script>Latn</script>
41
+ <status>
42
+ <stage abbreviation="PPUB">60</stage>
43
+ <substage abbreviation="PPUB">60</substage>
44
+ </status>
45
+ <copyright>
46
+ <from>#{Time.new.year}</from>
47
+ <owner>
48
+ <organization>
49
+ <name>International Electrotechnical Commission</name>
50
+ <abbreviation>IEC</abbreviation>
51
+ </organization>
52
+ </owner>
53
+ </copyright>
54
+ <ext>
55
+ <doctype>article</doctype>
56
+ <editorialgroup>
57
+ <technical-committee/>
58
+ <subcommittee/>
59
+ <workgroup/>
60
+ </editorialgroup>
61
+ <stagename>International standard</stagename>
62
+ <tc-sc-officers-note>
63
+ <p id='_'>
64
+ This FDIS is the result of the discussion between the IEC SC21A
65
+ experts WG 3 during the meeting held in Chicago (USA) on April 9th
66
+ </p>
67
+ <p id='_'>
68
+ This document is also of interest for ISO/ TC114/ WG1 Requirements for
69
+ Watch batteries
70
+ </p>
71
+ </tc-sc-officers-note>
72
+ </ext>
73
+ </bibdata>
74
+ #{boilerplate(Nokogiri::XML(BLANK_HDR + '</iec-standard>'))}
75
+ <sections>
76
+ <clause id="_" inline-header="false" obligation="normative">
77
+
78
+ </clause>
79
+ </sections>
80
+ </iec-standard>
81
81
  OUTPUT
82
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
83
+ .to be_equivalent_to xmlpp(output)
82
84
  end
83
85
 
84
86
  it "removes empty text elements" do
85
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
87
+ input = <<~INPUT
86
88
  #{ASCIIDOC_BLANK_HDR}
87
89
  == {blank}
88
90
  INPUT
89
- #{@blank_hdr}
90
- <sections>
91
- <clause id="_" inline-header="false" obligation="normative">
92
-
93
- </clause>
94
- </sections>
95
- </iec-standard>
96
- OUTPUT
97
- end
98
-
99
- it "processes stem-only terms as admitted" do
100
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
101
- #{ASCIIDOC_BLANK_HDR}
102
- == Terms and Definitions
103
-
104
- === stem:[t_90]
105
-
106
- stem:[t_91]
107
-
108
- Time
109
- INPUT
110
- #{@blank_hdr}
111
- <sections>
112
- <terms id="_" obligation="normative">
113
- <title>Terms and definitions</title>
114
- <p id="_">For the purposes of this document,
115
- the following terms and definitions apply.</p>
116
- #{TERMS_BOILERPLATE}
117
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
118
- <mi>t</mi>
119
- </mrow>
120
- <mrow>
121
- <mn>90</mn>
122
- </mrow>
123
- </msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
124
- <mi>t</mi>
125
- </mrow>
126
- <mrow>
127
- <mn>91</mn>
128
- </mrow>
129
- </msub></math></stem></admitted>
130
- <definition><p id="_">Time</p></definition></term>
131
- </terms>
132
- </sections>
133
- </iec-standard>
134
- OUTPUT
135
- end
136
-
137
- it "permits multiple blocks in term definition paragraph" do
138
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
139
- = Document title
140
- Author
141
- :docfile: test.adoc
142
- :nodoc:
143
- :novalid:
144
- :stem:
145
- :no-isobib:
146
-
147
- == Terms and Definitions
148
-
149
- === stem:[t_90]
150
-
151
- [stem]
152
- ++++
153
- t_A
154
- ++++
91
+ output = <<~OUTPUT
92
+ #{@blank_hdr}
93
+ <sections>
94
+ <clause id="_" inline-header="false" obligation="normative">
155
95
 
156
- This paragraph is extraneous
157
- INPUT
158
- #{@blank_hdr}
159
- <sections>
160
- <terms id="_" obligation="normative">
161
- <title>Terms and definitions</title>
162
- <p id="_">For the purposes of this document,
163
- the following terms and definitions apply.</p>
164
- #{TERMS_BOILERPLATE}
165
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
166
- <mi>t</mi>
167
- </mrow>
168
- <mrow>
169
- <mn>90</mn>
170
- </mrow>
171
- </msub></math></stem></preferred><definition><formula id="_">
172
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
173
- <mi>t</mi>
174
- </mrow>
175
- <mrow>
176
- <mi>A</mi>
177
- </mrow>
178
- </msub></math></stem>
179
- </formula><p id="_">This paragraph is extraneous</p></definition>
180
- </term>
181
- </terms>
182
- </sections>
183
- </iec-standard>
96
+ </clause>
97
+ </sections>
98
+ </iec-standard>
184
99
  OUTPUT
100
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
101
+ .to be_equivalent_to xmlpp(output)
185
102
  end
186
103
 
187
104
  it "keeps any initial boilerplate from terms and definitions" do
188
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
105
+ input = <<~INPUT
189
106
  #{ASCIIDOC_BLANK_HDR}
190
107
  == Terms and Definitions
191
108
 
@@ -197,29 +114,32 @@ end
197
114
 
198
115
  This paragraph is extraneous
199
116
  INPUT
200
- #{@blank_hdr}
201
- <sections>
202
- <terms id="_" obligation="normative"><title>Terms and definitions</title>
203
- <p id="_">For the purposes of this document,
204
- the following terms and definitions apply.</p>
205
- #{TERMS_BOILERPLATE}
206
- <p id='_'>I am boilerplate</p>
207
- <ul id='_'>
208
- <li>
209
- <p id='_'>So am I</p>
210
- </li>
211
- </ul>
212
- <term id="term-time">
213
- <preferred>Time</preferred>
214
- <definition><p id="_">This paragraph is extraneous</p></definition>
215
- </term></terms>
216
- </sections>
217
- </iec-standard>
117
+ output = <<~OUTPUT
118
+ #{@blank_hdr}
119
+ <sections>
120
+ <terms id="_" obligation="normative"><title>Terms and definitions</title>
121
+ <p id="_">For the purposes of this document,
122
+ the following terms and definitions apply.</p>
123
+ #{TERMS_BOILERPLATE}
124
+ <p id='_'>I am boilerplate</p>
125
+ <ul id='_'>
126
+ <li>
127
+ <p id='_'>So am I</p>
128
+ </li>
129
+ </ul>
130
+ <term id="term-time">
131
+ <preferred><expression><name>Time</name></expression></preferred>
132
+ <definition><verbal-definition><p id="_">This paragraph is extraneous</p></verbal-definition></definition>
133
+ </term></terms>
134
+ </sections>
135
+ </iec-standard>
218
136
  OUTPUT
137
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
138
+ .to be_equivalent_to xmlpp(output)
219
139
  end
220
140
 
221
141
  it "strips type from xrefs" do
222
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
142
+ input = <<~INPUT
223
143
  #{ASCIIDOC_BLANK_HDR}
224
144
  <<iso216>>
225
145
 
@@ -227,67 +147,38 @@ end
227
147
  == Clause
228
148
  * [[[iso216,ISO 216]]], _Reference_
229
149
  INPUT
230
- #{@blank_hdr}
231
- <preface>
232
- <foreword id="_" obligation="informative">
233
- <title>FOREWORD</title>
234
- <p id="_">
235
- <eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
236
- </p>
237
- </foreword></preface><sections>
238
- </sections><bibliography><references id="_" obligation="informative" normative="false">
239
- <title>Bibliography</title>
240
- <bibitem id="iso216" type="standard">
241
- <title format="text/plain">Reference</title>
242
- <docidentifier>ISO 216</docidentifier>
243
- <docnumber>216</docnumber>
244
- <contributor>
245
- <role type="publisher"/>
246
- <organization>
247
- <name>International Organization for Standardization</name>
248
- <abbreviation>ISO</abbreviation>
249
- </organization>
250
- </contributor>
251
- </bibitem>
252
- </references></bibliography>
253
- </iec-standard>
150
+ output = <<~OUTPUT
151
+ #{@blank_hdr}
152
+ <preface>
153
+ <foreword id="_" obligation="informative">
154
+ <title>FOREWORD</title>
155
+ <p id="_">
156
+ <eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
157
+ </p>
158
+ </foreword></preface><sections>
159
+ </sections><bibliography><references id="_" obligation="informative" normative="false">
160
+ <title>Bibliography</title>
161
+ <bibitem id="iso216" type="standard">
162
+ <title format="text/plain">Reference</title>
163
+ <docidentifier>ISO 216</docidentifier>
164
+ <docnumber>216</docnumber>
165
+ <contributor>
166
+ <role type="publisher"/>
167
+ <organization>
168
+ <name>International Organization for Standardization</name>
169
+ <abbreviation>ISO</abbreviation>
170
+ </organization>
171
+ </contributor>
172
+ </bibitem>
173
+ </references></bibliography>
174
+ </iec-standard>
254
175
  OUTPUT
255
- end
256
-
257
- it "processes localities in term sources" do
258
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
259
- #{ASCIIDOC_BLANK_HDR}
260
- == Terms and Definitions
261
-
262
- === Term1
263
-
264
- [.source]
265
- <<ISO2191,section=1>>
266
- INPUT
267
- #{@blank_hdr}
268
- <sections>
269
- <terms id="_" obligation="normative">
270
- <title>Terms and definitions</title>
271
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
272
- #{TERMS_BOILERPLATE}
273
- <term id="term-term1">
274
- <preferred>Term1</preferred>
275
- <termsource status="identical">
276
- <origin bibitemid="ISO2191" type="inline" citeas="">
277
- <localityStack>
278
- <locality type="section"><referenceFrom>1</referenceFrom></locality>
279
- </localityStack>
280
- </origin>
281
- </termsource>
282
- </term>
283
- </terms>
284
- </sections>
285
- </iec-standard>
286
- OUTPUT
176
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
177
+ .to be_equivalent_to xmlpp(output)
287
178
  end
288
179
 
289
180
  it "removes extraneous material from Normative References" do
290
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
181
+ input = <<~INPUT
291
182
  #{ASCIIDOC_BLANK_HDR}
292
183
  [bibliography]
293
184
  == Normative References
@@ -296,6 +187,7 @@ end
296
187
 
297
188
  * [[[iso216,ISO 216]]], _Reference_
298
189
  INPUT
190
+ output = <<~OUTPUT
299
191
  #{@blank_hdr}
300
192
  <sections></sections>
301
193
  <bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
@@ -316,43 +208,51 @@ end
316
208
  </bibliography>
317
209
  </iec-standard>
318
210
  OUTPUT
211
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
212
+ .to be_equivalent_to xmlpp(output)
319
213
  end
320
214
 
321
215
  it "inserts IDs into paragraphs" do
322
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
216
+ input = <<~INPUT
323
217
  #{ASCIIDOC_BLANK_HDR}
324
218
  Paragraph
325
219
  INPUT
326
- #{@blank_hdr}
327
- <sections>
328
- <p id="_">Paragraph</p>
329
- </sections>
330
- </iec-standard>
220
+ output = <<~OUTPUT
221
+ #{@blank_hdr}
222
+ <sections>
223
+ <p id="_">Paragraph</p>
224
+ </sections>
225
+ </iec-standard>
331
226
  OUTPUT
227
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
228
+ .to be_equivalent_to xmlpp(output)
332
229
  end
333
230
 
334
231
  it "inserts IDs into notes" do
335
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
232
+ input = <<~INPUT
336
233
  #{ASCIIDOC_BLANK_HDR}
337
234
  [example]
338
235
  ====
339
236
  NOTE: This note has no ID
340
237
  ====
341
238
  INPUT
342
- #{@blank_hdr}
343
- <sections>
344
- <example id="_">
345
- <note id="_">
346
- <p id="_">This note has no ID</p>
347
- </note>
348
- </example>
349
- </sections>
350
- </iec-standard>
239
+ output = <<~OUTPUT
240
+ #{@blank_hdr}
241
+ <sections>
242
+ <example id="_">
243
+ <note id="_">
244
+ <p id="_">This note has no ID</p>
245
+ </note>
246
+ </example>
247
+ </sections>
248
+ </iec-standard>
351
249
  OUTPUT
250
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
251
+ .to be_equivalent_to xmlpp(output)
352
252
  end
353
253
 
354
254
  it "moves footnotes inside figures" do
355
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
255
+ input = <<~INPUT
356
256
  #{ASCIIDOC_BLANK_HDR}
357
257
  image::spec/examples/rice_images/rice_image1.png[]
358
258
 
@@ -360,23 +260,26 @@ end
360
260
 
361
261
  footnote:[This is another footnote to a figure]
362
262
  INPUT
363
- #{@blank_hdr}
364
- <sections><figure id="_">
365
- <image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
366
- <fn reference="a">
367
- <p id="_">This is a footnote to a figure</p>
368
- </fn><fn reference="b">
369
- <p id="_">This is another footnote to a figure</p>
370
- </fn></figure>
371
-
372
- </sections>
373
-
374
- </iec-standard>
263
+ output = <<~OUTPUT
264
+ #{@blank_hdr}
265
+ <sections><figure id="_">
266
+ <image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
267
+ <fn reference="a">
268
+ <p id="_">This is a footnote to a figure</p>
269
+ </fn><fn reference="b">
270
+ <p id="_">This is another footnote to a figure</p>
271
+ </fn></figure>
272
+
273
+ </sections>
274
+
275
+ </iec-standard>
375
276
  OUTPUT
277
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
278
+ .to be_equivalent_to xmlpp(output)
376
279
  end
377
280
 
378
281
  it "defaults section obligations" do
379
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
282
+ input = <<~INPUT
380
283
  #{ASCIIDOC_BLANK_HDR}
381
284
 
382
285
  == Clause
@@ -387,79 +290,85 @@ end
387
290
 
388
291
  Text
389
292
  INPUT
390
- #{@blank_hdr}
391
- <sections><clause id="_" inline-header="false" obligation="normative">
392
- <title>Clause</title>
393
- <p id="_">Text</p>
394
- </clause>
395
- </sections><annex id="_" inline-header="false" obligation="normative">
396
- <title>Clause</title>
397
- <p id="_">Text</p>
398
- </annex>
399
- </iec-standard>
293
+ output = <<~OUTPUT
294
+ #{@blank_hdr}
295
+ <sections><clause id="_" inline-header="false" obligation="normative">
296
+ <title>Clause</title>
297
+ <p id="_">Text</p>
298
+ </clause>
299
+ </sections><annex id="_" inline-header="false" obligation="normative">
300
+ <title>Clause</title>
301
+ <p id="_">Text</p>
302
+ </annex>
303
+ </iec-standard>
400
304
  OUTPUT
305
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
306
+ .to be_equivalent_to xmlpp(output)
401
307
  end
402
308
 
403
309
  it "extends clause levels past 5" do
404
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
405
- #{ASCIIDOC_BLANK_HDR}
310
+ input = <<~INPUT
311
+ #{ASCIIDOC_BLANK_HDR}
406
312
 
407
- == Clause1
313
+ == Clause1
408
314
 
409
- === Clause2
315
+ === Clause2
410
316
 
411
- ==== Clause3
317
+ ==== Clause3
412
318
 
413
- ===== Clause4
319
+ ===== Clause4
414
320
 
415
- ====== Clause 5
321
+ ====== Clause 5
416
322
 
417
- [level=6]
418
- ====== Clause 6
323
+ [level=6]
324
+ ====== Clause 6
419
325
 
420
- [level=7]
421
- ====== Clause 7A
326
+ [level=7]
327
+ ====== Clause 7A
422
328
 
423
- [level=7]
424
- ====== Clause 7B
329
+ [level=7]
330
+ ====== Clause 7B
425
331
 
426
- [level=6]
427
- ====== Clause 6B
332
+ [level=6]
333
+ ====== Clause 6B
428
334
 
429
- ====== Clause 5B
335
+ ====== Clause 5B
430
336
 
431
337
  INPUT
432
- #{@blank_hdr}
433
- <sections>
434
- <clause id="_" inline-header="false" obligation="normative">
435
- <title>Clause1</title>
436
- <clause id="_" inline-header="false" obligation="normative">
437
- <title>Clause2</title>
438
- <clause id="_" inline-header="false" obligation="normative">
439
- <title>Clause3</title>
440
- <clause id="_" inline-header="false" obligation="normative"><title>Clause4</title><clause id="_" inline-header="false" obligation="normative">
441
- <title>Clause 5</title>
442
- <clause id="_" inline-header="false" obligation="normative">
443
- <title>Clause 6</title>
444
- <clause id="_" inline-header="false" obligation="normative">
445
- <title>Clause 7A</title>
446
- </clause><clause id="_" inline-header="false" obligation="normative">
447
- <title>Clause 7B</title>
448
- </clause></clause><clause id="_" inline-header="false" obligation="normative">
449
- <title>Clause 6B</title>
450
- </clause></clause>
451
-
452
-
453
-
454
-
455
- <clause id="_" inline-header="false" obligation="normative">
456
- <title>Clause 5B</title>
457
- </clause></clause>
458
- </clause>
459
- </clause>
460
- </clause>
461
- </sections>
462
- </iec-standard>
338
+ output = <<~OUTPUT
339
+ #{@blank_hdr}
340
+ <sections>
341
+ <clause id="_" inline-header="false" obligation="normative">
342
+ <title>Clause1</title>
343
+ <clause id="_" inline-header="false" obligation="normative">
344
+ <title>Clause2</title>
345
+ <clause id="_" inline-header="false" obligation="normative">
346
+ <title>Clause3</title>
347
+ <clause id="_" inline-header="false" obligation="normative"><title>Clause4</title><clause id="_" inline-header="false" obligation="normative">
348
+ <title>Clause 5</title>
349
+ <clause id="_" inline-header="false" obligation="normative">
350
+ <title>Clause 6</title>
351
+ <clause id="_" inline-header="false" obligation="normative">
352
+ <title>Clause 7A</title>
353
+ </clause><clause id="_" inline-header="false" obligation="normative">
354
+ <title>Clause 7B</title>
355
+ </clause></clause><clause id="_" inline-header="false" obligation="normative">
356
+ <title>Clause 6B</title>
357
+ </clause></clause>
358
+
359
+
360
+
361
+
362
+ <clause id="_" inline-header="false" obligation="normative">
363
+ <title>Clause 5B</title>
364
+ </clause></clause>
365
+ </clause>
366
+ </clause>
367
+ </clause>
368
+ </sections>
369
+ </iec-standard>
463
370
  OUTPUT
371
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
372
+ .to be_equivalent_to xmlpp(output)
464
373
  end
465
374
  end