metanorma-iso 2.2.2 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/header-dis.html +111 -29
- data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
- data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
- data/lib/isodoc/iso/html/style-human.css +7 -2
- data/lib/isodoc/iso/html/style-human.scss +0 -1
- data/lib/isodoc/iso/html/style-iso.css +7 -2
- data/lib/isodoc/iso/html/style-iso.scss +0 -1
- data/lib/isodoc/iso/html/wordstyle-dis.css +160 -4
- data/lib/isodoc/iso/html/wordstyle-dis.scss +154 -4
- data/lib/isodoc/iso/html/wordstyle.css +150 -0
- data/lib/isodoc/iso/html/wordstyle.scss +144 -0
- data/lib/isodoc/iso/i18n-en.yaml +4 -4
- data/lib/isodoc/iso/iso.amendment.xsl +1649 -1199
- data/lib/isodoc/iso/iso.international-standard.xsl +1649 -1199
- data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
- data/lib/isodoc/iso/word_convert.rb +6 -4
- data/lib/isodoc/iso/word_dis_cleanup.rb +30 -8
- data/lib/isodoc/iso/word_dis_convert.rb +5 -2
- data/lib/metanorma/iso/base.rb +2 -1
- data/lib/metanorma/iso/biblio.rng +5 -0
- data/lib/metanorma/iso/isodoc.rng +47 -13
- data/lib/metanorma/iso/validate.rb +2 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +5 -2
- metadata +4 -87
- data/.github/workflows/automerge.yml +0 -31
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.github/workflows/ubuntu.yml +0 -41
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.css +0 -2
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -2
- data/spec/assets/iso.adoc +0 -10
- data/spec/assets/iso.headless.html +0 -33
- data/spec/assets/iso.xml +0 -71
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/examples/103_01_02.html +0 -247
- data/spec/examples/english.yaml +0 -69
- data/spec/examples/iso_123_.xml +0 -45
- data/spec/examples/iso_123_all_parts.xml +0 -45
- data/spec/examples/iso_123_no_year_note.xml +0 -46
- data/spec/examples/iso_124_.xml +0 -41
- data/spec/examples/iso_216_.xml +0 -47
- data/spec/examples/iso_iec_12382_.xml +0 -48
- data/spec/examples/rice.adoc +0 -714
- data/spec/examples/rice.preview.html +0 -1870
- data/spec/examples/rice.sh +0 -4
- data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
- data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/ISO_1213_1.png +0 -0
- data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/rice_image1.png +0 -0
- data/spec/examples/rice_img/rice_image2.png +0 -0
- data/spec/examples/rice_img/rice_image3_1.png +0 -0
- data/spec/examples/rice_img/rice_image3_2.png +0 -0
- data/spec/examples/rice_img/rice_image3_3.png +0 -0
- data/spec/isodoc/amd_spec.rb +0 -986
- data/spec/isodoc/blocks_spec.rb +0 -1174
- data/spec/isodoc/i18n_spec.rb +0 -1579
- data/spec/isodoc/inline_spec.rb +0 -1060
- data/spec/isodoc/iso_spec.rb +0 -255
- data/spec/isodoc/metadata_spec.rb +0 -701
- data/spec/isodoc/postproc_spec.rb +0 -1089
- data/spec/isodoc/ref_spec.rb +0 -439
- data/spec/isodoc/section_spec.rb +0 -998
- data/spec/isodoc/table_spec.rb +0 -420
- data/spec/isodoc/terms_spec.rb +0 -314
- data/spec/isodoc/word_dis_spec.rb +0 -2064
- data/spec/isodoc/xref_spec.rb +0 -1747
- data/spec/metanorma/amd_spec.rb +0 -724
- data/spec/metanorma/base_spec.rb +0 -1384
- data/spec/metanorma/blank_spec.rb +0 -38
- data/spec/metanorma/blocks_spec.rb +0 -624
- data/spec/metanorma/cleanup_spec.rb +0 -1645
- data/spec/metanorma/inline_spec.rb +0 -203
- data/spec/metanorma/lists_spec.rb +0 -197
- data/spec/metanorma/macros_spec.rb +0 -99
- data/spec/metanorma/processor_spec.rb +0 -161
- data/spec/metanorma/refs_spec.rb +0 -672
- data/spec/metanorma/section_spec.rb +0 -492
- data/spec/metanorma/table_spec.rb +0 -329
- data/spec/metanorma/validate_spec.rb +0 -2153
- data/spec/relaton/render_spec.rb +0 -568
- data/spec/requirements/requirement_components_spec.rb +0 -610
- data/spec/requirements/requirements_spec.rb +0 -1596
- data/spec/requirements/xref_spec.rb +0 -1211
- data/spec/spec_helper.rb +0 -313
- data/spec/vcr_cassettes/docrels.yml +0 -385
- data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -1,492 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
RSpec.describe Metanorma::ISO do
|
4
|
-
it "processes sections" do
|
5
|
-
input = <<~INPUT
|
6
|
-
#{ASCIIDOC_BLANK_HDR}
|
7
|
-
== Foreword
|
8
|
-
|
9
|
-
Text
|
10
|
-
|
11
|
-
== Introduction
|
12
|
-
|
13
|
-
=== Introduction Subsection
|
14
|
-
|
15
|
-
== Acknowledgements
|
16
|
-
|
17
|
-
== Scope
|
18
|
-
|
19
|
-
Text
|
20
|
-
|
21
|
-
== Normative References
|
22
|
-
|
23
|
-
== Terms and Definitions
|
24
|
-
|
25
|
-
=== Term1
|
26
|
-
|
27
|
-
== Terms, Definitions, Symbols and Abbreviated Terms
|
28
|
-
|
29
|
-
=== Normal Terms
|
30
|
-
|
31
|
-
==== Term2
|
32
|
-
|
33
|
-
=== Symbols and Abbreviated Terms
|
34
|
-
|
35
|
-
== Symbols and Abbreviated Terms
|
36
|
-
|
37
|
-
== Clause 4
|
38
|
-
|
39
|
-
=== Introduction
|
40
|
-
|
41
|
-
=== Clause 4.2
|
42
|
-
|
43
|
-
== Terms and Definitions
|
44
|
-
|
45
|
-
[appendix]
|
46
|
-
== Annex
|
47
|
-
|
48
|
-
=== Annex A.1
|
49
|
-
|
50
|
-
[%appendix]
|
51
|
-
=== Appendix 1
|
52
|
-
|
53
|
-
==== Appendix subclause
|
54
|
-
|
55
|
-
== Bibliography
|
56
|
-
|
57
|
-
=== Bibliography Subsection
|
58
|
-
INPUT
|
59
|
-
output = <<~OUTPUT
|
60
|
-
#{BLANK_HDR}
|
61
|
-
<preface>
|
62
|
-
<foreword id="_" obligation="informative">
|
63
|
-
<title>Foreword</title>
|
64
|
-
<p id="_">Text</p>
|
65
|
-
</foreword>
|
66
|
-
<introduction id="_" obligation="informative">
|
67
|
-
<title>Introduction</title>
|
68
|
-
<clause id="_" inline-header="false" obligation="informative">
|
69
|
-
<title>Introduction Subsection</title>
|
70
|
-
</clause>
|
71
|
-
</introduction>
|
72
|
-
<acknowledgements id="_" obligation="informative">
|
73
|
-
<title>Acknowledgements</title>
|
74
|
-
</acknowledgements>
|
75
|
-
</preface>
|
76
|
-
<sections>
|
77
|
-
<clause id="_" inline-header="false" obligation="normative" type="scope">
|
78
|
-
<title>Scope</title>
|
79
|
-
<p id="_">Text</p>
|
80
|
-
</clause>
|
81
|
-
<terms id="_" obligation="normative">
|
82
|
-
<title>Terms and definitions</title>
|
83
|
-
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
84
|
-
<p id="_">ISO and IEC maintain terminology databases for use in standardization at the following addresses:</p>
|
85
|
-
<ul id="_">
|
86
|
-
<li>
|
87
|
-
<p id="_">ISO Online browsing platform: available at
|
88
|
-
<link target="https://www.iso.org/obp"/></p>
|
89
|
-
</li>
|
90
|
-
<li>
|
91
|
-
<p id="_">IEC Electropedia: available at
|
92
|
-
<link target="https://www.electropedia.org"/></p>
|
93
|
-
</li>
|
94
|
-
</ul>
|
95
|
-
<term id="term-Term1">
|
96
|
-
<preferred><expression><name>Term1</name></expression></preferred>
|
97
|
-
</term>
|
98
|
-
</terms>
|
99
|
-
<clause id="_" obligation="normative">
|
100
|
-
<title>Terms, definitions, symbols and abbreviated terms</title>
|
101
|
-
<terms id="_" obligation="normative">
|
102
|
-
<title>Normal Terms</title>
|
103
|
-
<term id="term-Term2">
|
104
|
-
<preferred><expression><name>Term2</name></expression></preferred>
|
105
|
-
</term>
|
106
|
-
</terms>
|
107
|
-
<definitions id="_" obligation="normative">
|
108
|
-
<title>Symbols and abbreviated terms</title>
|
109
|
-
</definitions>
|
110
|
-
</clause>
|
111
|
-
<definitions id="_" obligation="normative">
|
112
|
-
<title>Symbols and abbreviated terms</title>
|
113
|
-
</definitions>
|
114
|
-
<clause id="_" inline-header="false" obligation="normative">
|
115
|
-
<title>Clause 4</title>
|
116
|
-
<clause id="_" inline-header="false" obligation="normative">
|
117
|
-
<title>Introduction</title>
|
118
|
-
</clause>
|
119
|
-
<clause id="_" inline-header="false" obligation="normative">
|
120
|
-
<title>Clause 4.2</title>
|
121
|
-
</clause>
|
122
|
-
</clause>
|
123
|
-
<clause id="_" inline-header="false" obligation="normative">
|
124
|
-
<title>Terms and Definitions</title>
|
125
|
-
</clause>
|
126
|
-
</sections>
|
127
|
-
<annex id="_" inline-header="false" obligation="normative">
|
128
|
-
<title>Annex</title>
|
129
|
-
<clause id="_" inline-header="false" obligation="normative">
|
130
|
-
<title>Annex A.1</title>
|
131
|
-
</clause>
|
132
|
-
<appendix id="_" inline-header="false" obligation="normative">
|
133
|
-
<title>Appendix 1</title>
|
134
|
-
<clause id="_" inline-header="false" obligation="normative">
|
135
|
-
<title>Appendix subclause</title>
|
136
|
-
</clause>
|
137
|
-
</appendix>
|
138
|
-
</annex>
|
139
|
-
<bibliography>
|
140
|
-
<references id="_" normative="true" obligation="informative">
|
141
|
-
<title>Normative references</title>
|
142
|
-
<p id="_">There are no normative references in this document.</p>
|
143
|
-
</references>
|
144
|
-
<clause id="_" obligation="informative">
|
145
|
-
<title>Bibliography</title>
|
146
|
-
<references id="_" normative="false" obligation="informative">
|
147
|
-
<title>Bibliography Subsection</title>
|
148
|
-
</references>
|
149
|
-
</clause>
|
150
|
-
</bibliography>
|
151
|
-
</iso-standard>
|
152
|
-
OUTPUT
|
153
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
154
|
-
.to be_equivalent_to xmlpp(output)
|
155
|
-
end
|
156
|
-
|
157
|
-
it "processes section obligations" do
|
158
|
-
input = <<~INPUT
|
159
|
-
#{ASCIIDOC_BLANK_HDR}
|
160
|
-
[obligation=informative]
|
161
|
-
== Clause 1
|
162
|
-
|
163
|
-
=== Clause 1a
|
164
|
-
|
165
|
-
[obligation=normative]
|
166
|
-
== Clause 2
|
167
|
-
|
168
|
-
[appendix,obligation=informative]
|
169
|
-
== Annex
|
170
|
-
INPUT
|
171
|
-
output = <<~OUTPUT
|
172
|
-
#{BLANK_HDR}
|
173
|
-
<sections>
|
174
|
-
<clause id="_" inline-header="false" obligation="informative">
|
175
|
-
<title>Clause 1</title>
|
176
|
-
<clause id="_" inline-header="false" obligation="informative">
|
177
|
-
<title>Clause 1a</title>
|
178
|
-
</clause>
|
179
|
-
</clause>
|
180
|
-
<clause id="_" inline-header="false" obligation="normative">
|
181
|
-
<title>Clause 2</title>
|
182
|
-
</clause>
|
183
|
-
</sections>
|
184
|
-
<annex id="_" inline-header="false" obligation="informative">
|
185
|
-
<title>Annex</title>
|
186
|
-
</annex>
|
187
|
-
</iso-standard>
|
188
|
-
OUTPUT
|
189
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
190
|
-
.to be_equivalent_to xmlpp(output)
|
191
|
-
end
|
192
|
-
|
193
|
-
it "processes inline headers" do
|
194
|
-
input = <<~INPUT
|
195
|
-
#{ASCIIDOC_BLANK_HDR}
|
196
|
-
== Clause 1
|
197
|
-
|
198
|
-
[%inline-header]
|
199
|
-
=== Clause 1a
|
200
|
-
|
201
|
-
[appendix]
|
202
|
-
== Annex A
|
203
|
-
|
204
|
-
[%inline-header]
|
205
|
-
=== Clause Aa
|
206
|
-
INPUT
|
207
|
-
output = <<~OUTPUT
|
208
|
-
#{BLANK_HDR}
|
209
|
-
<sections>
|
210
|
-
<clause id="_" inline-header="false" obligation="normative">
|
211
|
-
<title>Clause 1</title>
|
212
|
-
<clause id="_" inline-header="true" obligation="normative">
|
213
|
-
<title>Clause 1a</title>
|
214
|
-
</clause>
|
215
|
-
</clause>
|
216
|
-
</sections>
|
217
|
-
<annex id="_" inline-header="false" obligation="normative">
|
218
|
-
<title>Annex A</title>
|
219
|
-
<clause id="_" inline-header="true" obligation="normative">
|
220
|
-
<title>Clause Aa</title>
|
221
|
-
</clause>
|
222
|
-
</annex>
|
223
|
-
</iso-standard>
|
224
|
-
OUTPUT
|
225
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
226
|
-
.to be_equivalent_to xmlpp(output)
|
227
|
-
end
|
228
|
-
|
229
|
-
it "processes blank headers" do
|
230
|
-
input = <<~INPUT
|
231
|
-
#{ASCIIDOC_BLANK_HDR}
|
232
|
-
== Clause 1
|
233
|
-
|
234
|
-
=== {blank}
|
235
|
-
|
236
|
-
INPUT
|
237
|
-
output = <<~OUTPUT
|
238
|
-
#{BLANK_HDR}
|
239
|
-
<sections>
|
240
|
-
<clause id="_" inline-header="false" obligation="normative">
|
241
|
-
<title>Clause 1</title>
|
242
|
-
<clause id="_" inline-header="false" obligation="normative"/>
|
243
|
-
</clause>
|
244
|
-
</sections>
|
245
|
-
</iso-standard>
|
246
|
-
OUTPUT
|
247
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
248
|
-
.to be_equivalent_to xmlpp(output)
|
249
|
-
end
|
250
|
-
|
251
|
-
it "processes terms & definitions with external source" do
|
252
|
-
input = <<~INPUT
|
253
|
-
#{ASCIIDOC_BLANK_HDR}
|
254
|
-
|
255
|
-
Foreword
|
256
|
-
|
257
|
-
[source="iso1234,iso5678"]
|
258
|
-
== Terms and Definitions
|
259
|
-
|
260
|
-
=== Term1
|
261
|
-
|
262
|
-
INPUT
|
263
|
-
output = <<~OUTPUT
|
264
|
-
#{BLANK_HDR.sub(/<boilerplate>/, '<termdocsource bibitemid="iso1234"/><termdocsource bibitemid="iso5678"/><boilerplate>')}
|
265
|
-
<preface>
|
266
|
-
<foreword id="_" obligation="informative">
|
267
|
-
<title>Foreword</title>
|
268
|
-
<p id="_">Foreword</p>
|
269
|
-
</foreword>
|
270
|
-
</preface>
|
271
|
-
<sections>
|
272
|
-
<terms id="_" obligation="normative">
|
273
|
-
<title>Terms and definitions</title>
|
274
|
-
<p id="_">For the purposes of this document, the terms and definitions
|
275
|
-
given in <eref bibitemid="iso1234"/>
|
276
|
-
and <eref bibitemid="iso5678"/>
|
277
|
-
and the following apply.</p>
|
278
|
-
<p id="_">ISO and IEC maintain terminology databases for use in
|
279
|
-
standardization at the following addresses:</p>
|
280
|
-
<ul id="_">
|
281
|
-
<li>
|
282
|
-
<p id="_">ISO Online browsing platform: available at
|
283
|
-
<link target="https://www.iso.org/obp"/></p>
|
284
|
-
</li>
|
285
|
-
<li>
|
286
|
-
<p id="_">IEC Electropedia: available at
|
287
|
-
<link target="https://www.electropedia.org"/></p>
|
288
|
-
</li>
|
289
|
-
</ul>
|
290
|
-
<term id="term-Term1">
|
291
|
-
<preferred><expression><name>Term1</name></expression></preferred>
|
292
|
-
</term>
|
293
|
-
</terms>
|
294
|
-
</sections>
|
295
|
-
</iso-standard>
|
296
|
-
OUTPUT
|
297
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
298
|
-
.to be_equivalent_to xmlpp(output)
|
299
|
-
end
|
300
|
-
|
301
|
-
it "processes empty terms & definitions" do
|
302
|
-
input = <<~INPUT
|
303
|
-
#{ASCIIDOC_BLANK_HDR}
|
304
|
-
|
305
|
-
Foreword
|
306
|
-
|
307
|
-
== Terms and Definitions
|
308
|
-
|
309
|
-
|
310
|
-
INPUT
|
311
|
-
output = <<~OUTPUT
|
312
|
-
#{BLANK_HDR}
|
313
|
-
<preface>
|
314
|
-
<foreword id="_" obligation="informative">
|
315
|
-
<title>Foreword</title>
|
316
|
-
<p id="_">Foreword</p>
|
317
|
-
</foreword>
|
318
|
-
</preface>
|
319
|
-
<sections>
|
320
|
-
<terms id='_' obligation='normative'>
|
321
|
-
<title>Terms and definitions</title>
|
322
|
-
<p id='_'>No terms and definitions are listed in this document.</p>
|
323
|
-
<p id='_'>
|
324
|
-
ISO and IEC maintain terminology databases for use in standardization
|
325
|
-
at the following addresses:
|
326
|
-
</p>
|
327
|
-
<ul id='_'>
|
328
|
-
<li>
|
329
|
-
<p id='_'>
|
330
|
-
ISO Online browsing platform: available at
|
331
|
-
<link target='https://www.iso.org/obp'/>
|
332
|
-
</p>
|
333
|
-
</li>
|
334
|
-
<li>
|
335
|
-
<p id='_'>
|
336
|
-
IEC Electropedia: available at
|
337
|
-
<link target='https://www.electropedia.org'/>
|
338
|
-
</p>
|
339
|
-
</li>
|
340
|
-
</ul>
|
341
|
-
</terms>
|
342
|
-
</sections>
|
343
|
-
</iso-standard>
|
344
|
-
|
345
|
-
OUTPUT
|
346
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
347
|
-
.to be_equivalent_to xmlpp(output)
|
348
|
-
end
|
349
|
-
|
350
|
-
it "processes empty terms & definitions with external source" do
|
351
|
-
input = <<~INPUT
|
352
|
-
#{ASCIIDOC_BLANK_HDR}
|
353
|
-
|
354
|
-
Foreword
|
355
|
-
|
356
|
-
[source="iso1234,iso5678"]
|
357
|
-
== Terms and Definitions
|
358
|
-
|
359
|
-
INPUT
|
360
|
-
output = <<~OUTPUT
|
361
|
-
#{BLANK_HDR.sub(/<boilerplate>/, '<termdocsource bibitemid="iso1234"/><termdocsource bibitemid="iso5678"/><boilerplate>')}
|
362
|
-
<preface>
|
363
|
-
<foreword id="_" obligation="informative">
|
364
|
-
<title>Foreword</title>
|
365
|
-
<p id="_">Foreword</p>
|
366
|
-
</foreword>
|
367
|
-
</preface>
|
368
|
-
<sections>
|
369
|
-
<terms id="_" obligation="normative">
|
370
|
-
<title>Terms and definitions</title>
|
371
|
-
<p id="_">For the purposes of this document,
|
372
|
-
the terms and definitions given in <eref bibitemid="iso1234"/>
|
373
|
-
and <eref bibitemid="iso5678"/>
|
374
|
-
apply.
|
375
|
-
</p>
|
376
|
-
<p id="_">ISO and IEC maintain terminology databases for use in standardization at the following addresses:</p>
|
377
|
-
<ul id="_">
|
378
|
-
<li>
|
379
|
-
<p id="_">ISO Online browsing platform: available at
|
380
|
-
<link target="https://www.iso.org/obp"/></p>
|
381
|
-
</li>
|
382
|
-
<li>
|
383
|
-
<p id="_">IEC Electropedia: available at
|
384
|
-
<link target="https://www.electropedia.org"/></p>
|
385
|
-
</li>
|
386
|
-
</ul>
|
387
|
-
</terms>
|
388
|
-
</sections>
|
389
|
-
</iso-standard>
|
390
|
-
OUTPUT
|
391
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
392
|
-
.to be_equivalent_to xmlpp(output)
|
393
|
-
end
|
394
|
-
|
395
|
-
it "ignores multiple terms & definitions in default documents" do
|
396
|
-
input = <<~INPUT
|
397
|
-
#{ASCIIDOC_BLANK_HDR}
|
398
|
-
|
399
|
-
== Terms and Definitions
|
400
|
-
|
401
|
-
== Clause
|
402
|
-
|
403
|
-
[heading=terms and definitions]
|
404
|
-
== More terms
|
405
|
-
|
406
|
-
INPUT
|
407
|
-
output = <<~OUTPUT
|
408
|
-
#{BLANK_HDR}
|
409
|
-
<sections>
|
410
|
-
<terms id='_' obligation='normative'>
|
411
|
-
<title>Terms and definitions</title>
|
412
|
-
<p id='_'>No terms and definitions are listed in this document.</p>
|
413
|
-
<p id='_'>
|
414
|
-
ISO and IEC maintain terminology databases for use in standardization
|
415
|
-
at the following addresses:
|
416
|
-
</p>
|
417
|
-
<ul id='_'>
|
418
|
-
<li>
|
419
|
-
<p id='_'>
|
420
|
-
ISO Online browsing platform: available at
|
421
|
-
<link target='https://www.iso.org/obp'/>
|
422
|
-
</p>
|
423
|
-
</li>
|
424
|
-
<li>
|
425
|
-
<p id='_'>
|
426
|
-
IEC Electropedia: available at
|
427
|
-
<link target='https://www.electropedia.org'/>
|
428
|
-
</p>
|
429
|
-
</li>
|
430
|
-
</ul>
|
431
|
-
</terms>
|
432
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
433
|
-
<title>Clause</title>
|
434
|
-
</clause>
|
435
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
436
|
-
<title>More terms</title>
|
437
|
-
</clause>
|
438
|
-
</sections>
|
439
|
-
</iso-standard>
|
440
|
-
OUTPUT
|
441
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
442
|
-
.to be_equivalent_to xmlpp(output)
|
443
|
-
end
|
444
|
-
|
445
|
-
it "permits multiple terms & definitions in vocabulary documents" do
|
446
|
-
input = <<~INPUT
|
447
|
-
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":nodoc:\n:docsubtype: vocabulary")}
|
448
|
-
|
449
|
-
== Terms and Definitions
|
450
|
-
|
451
|
-
== Clause
|
452
|
-
|
453
|
-
[heading=terms and definitions]
|
454
|
-
== More terms
|
455
|
-
|
456
|
-
INPUT
|
457
|
-
output = <<~OUTPUT
|
458
|
-
#{BLANK_HDR.sub(%r{<doctype>standard</doctype>},
|
459
|
-
'<doctype>standard</doctype><subdoctype>vocabulary</subdoctype>')}
|
460
|
-
<sections>
|
461
|
-
<terms id='_' obligation='normative'>
|
462
|
-
<title>Terms and Definitions</title>
|
463
|
-
<p id='_'>No terms and definitions are listed in this document.</p>
|
464
|
-
<p id='_'>ISO and IEC maintain terminology databases for use in standardization
|
465
|
-
at the following addresses:
|
466
|
-
</p>
|
467
|
-
<ul id='_'>
|
468
|
-
<li>
|
469
|
-
<p id='_'>ISO Online browsing platform: available at
|
470
|
-
<link target='https://www.iso.org/obp'/>
|
471
|
-
</p>
|
472
|
-
</li>
|
473
|
-
<li>
|
474
|
-
<p id='_'>IEC Electropedia: available at
|
475
|
-
<link target='https://www.electropedia.org'/>
|
476
|
-
</p>
|
477
|
-
</li>
|
478
|
-
</ul>
|
479
|
-
</terms>
|
480
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
481
|
-
<title>Clause</title>
|
482
|
-
</clause>
|
483
|
-
<terms id='_' obligation='normative'>
|
484
|
-
<title>More terms</title>
|
485
|
-
</terms>
|
486
|
-
</sections>
|
487
|
-
</iso-standard>
|
488
|
-
OUTPUT
|
489
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
490
|
-
.to be_equivalent_to xmlpp(output)
|
491
|
-
end
|
492
|
-
end
|