metanorma-standoc 1.9.2 → 1.9.3
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.
- checksums.yaml +4 -4
- data/lib/asciidoctor/standoc/biblio.rng +1 -0
- data/lib/asciidoctor/standoc/cleanup.rb +33 -13
- data/lib/asciidoctor/standoc/cleanup_section.rb +84 -80
- data/lib/asciidoctor/standoc/front.rb +1 -1
- data/lib/asciidoctor/standoc/isodoc.rng +1 -3
- data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +31 -16
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +1 -1
- data/spec/asciidoctor/base_spec.rb +11 -11
- data/spec/asciidoctor/blocks_spec.rb +0 -2
- data/spec/asciidoctor/cleanup_sections_spec.rb +14 -14
- data/spec/asciidoctor/cleanup_spec.rb +60 -60
- data/spec/asciidoctor/inline_spec.rb +14 -14
- data/spec/asciidoctor/lists_spec.rb +3 -3
- data/spec/asciidoctor/macros_plantuml_spec.rb +8 -8
- data/spec/asciidoctor/macros_spec.rb +13 -13
- data/spec/asciidoctor/refs_dl_spec.rb +4 -4
- data/spec/asciidoctor/refs_spec.rb +18 -18
- data/spec/asciidoctor/section_spec.rb +58 -22
- data/spec/asciidoctor/table_spec.rb +6 -6
- data/spec/asciidoctor/validate_spec.rb +21 -21
- data/spec/spec_helper.rb +2 -0
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +45 -45
- data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123_1.yml +23 -23
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +31 -31
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_124.yml +11 -11
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
- metadata +4 -8
- data/lib/liquid/custom_blocks/key_iterator.rb +0 -21
- data/lib/liquid/custom_blocks/with_json_nested_context.rb +0 -18
- data/lib/liquid/custom_blocks/with_yaml_nested_context.rb +0 -19
- data/lib/liquid/custom_filters/values.rb +0 -7
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::Standoc do
|
4
4
|
it "handles spacing around markup" do
|
5
|
-
expect((strip_guid(Asciidoctor.convert(<<~"INPUT",
|
5
|
+
expect((strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to (<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
This is
|
8
8
|
a paragraph with <<x>>
|
@@ -36,7 +36,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "processes inline_quoted formatting" do
|
39
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
39
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
40
40
|
#{DUMBQUOTE_BLANK_HDR}
|
41
41
|
_Physical noise
|
42
42
|
sources_
|
@@ -82,7 +82,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
82
82
|
end
|
83
83
|
|
84
84
|
it "process mtext spaces" do
|
85
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
85
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
86
86
|
#{DUMBQUOTE_BLANK_HDR}
|
87
87
|
|
88
88
|
stem:[n < 1 " for all text "]
|
@@ -105,7 +105,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
105
105
|
end
|
106
106
|
|
107
107
|
it "properly handles inline substitution" do
|
108
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
108
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
109
109
|
#{DUMBQUOTE_BLANK_HDR}
|
110
110
|
|
111
111
|
stem:[n < 1] +
|
@@ -144,7 +144,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
144
144
|
end
|
145
145
|
|
146
146
|
it "normalises inline stem, straight quotes" do
|
147
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
147
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
148
148
|
#{DUMBQUOTE_BLANK_HDR}
|
149
149
|
|
150
150
|
stem:[n < 1]
|
@@ -183,7 +183,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
183
183
|
end
|
184
184
|
|
185
185
|
it "normalises inline stem, smart quotes" do
|
186
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
186
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
187
187
|
#{ASCIIDOC_BLANK_HDR}
|
188
188
|
|
189
189
|
stem:[n < 1]
|
@@ -222,7 +222,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
222
222
|
end
|
223
223
|
|
224
224
|
it "generates desired smart quotes for 'dd'" do
|
225
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
225
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
226
226
|
#{ASCIIDOC_BLANK_HDR}
|
227
227
|
'99'.
|
228
228
|
|
@@ -235,7 +235,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
235
235
|
end
|
236
236
|
|
237
237
|
it "processes breaks" do
|
238
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
238
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
239
239
|
#{ASCIIDOC_BLANK_HDR}
|
240
240
|
Line break +
|
241
241
|
line break
|
@@ -263,7 +263,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
263
263
|
end
|
264
264
|
|
265
265
|
it "processes links" do
|
266
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
266
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
267
267
|
#{ASCIIDOC_BLANK_HDR}
|
268
268
|
mailto:fred@example.com
|
269
269
|
http://example.com[]
|
@@ -285,7 +285,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
285
285
|
end
|
286
286
|
|
287
287
|
it "processes bookmarks" do
|
288
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
288
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
289
289
|
#{ASCIIDOC_BLANK_HDR}
|
290
290
|
Text [[bookmark]] Text
|
291
291
|
INPUT
|
@@ -298,7 +298,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
298
298
|
end
|
299
299
|
|
300
300
|
it "processes crossreferences" do
|
301
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
301
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
302
302
|
#{ASCIIDOC_BLANK_HDR}
|
303
303
|
[[reference]]
|
304
304
|
== Section
|
@@ -351,7 +351,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
351
351
|
end
|
352
352
|
|
353
353
|
it "processes bibliographic anchors" do
|
354
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
354
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
355
355
|
#{ASCIIDOC_BLANK_HDR}
|
356
356
|
[bibliography]
|
357
357
|
== Normative References
|
@@ -382,7 +382,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
382
382
|
end
|
383
383
|
|
384
384
|
it "processes footnotes" do
|
385
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
385
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
386
386
|
#{ASCIIDOC_BLANK_HDR}
|
387
387
|
Hello!footnote:[Footnote text]
|
388
388
|
|
@@ -421,7 +421,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
421
421
|
end
|
422
422
|
|
423
423
|
it "processes index terms" do
|
424
|
-
expect((strip_guid(Asciidoctor.convert(<<~"INPUT",
|
424
|
+
expect((strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to (<<~"OUTPUT")
|
425
425
|
#{ASCIIDOC_BLANK_HDR}
|
426
426
|
((See)) Index ((_term_)) and(((A~B~, stem:[alpha], Ⲁ))).
|
427
427
|
INPUT
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::Standoc do
|
4
4
|
it "processes simple lists" do
|
5
|
-
output = Asciidoctor.convert(<<~"INPUT",
|
5
|
+
output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
* List 1
|
8
8
|
* List 2
|
@@ -70,7 +70,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
70
70
|
end
|
71
71
|
|
72
72
|
it "processes complex lists" do
|
73
|
-
output = Asciidoctor.convert(<<~"INPUT",
|
73
|
+
output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
74
74
|
#{ASCIIDOC_BLANK_HDR}
|
75
75
|
[[id]]
|
76
76
|
[keep-with-next=true,keep-lines-together=true]
|
@@ -189,7 +189,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
189
189
|
end
|
190
190
|
|
191
191
|
it "anchors lists and list items" do
|
192
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
192
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
193
193
|
#{ASCIIDOC_BLANK_HDR}
|
194
194
|
[[id1]]
|
195
195
|
* [[id2]] List item
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::Standoc do
|
4
4
|
it "processes the PlantUML macro" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)).gsub(%r{plantuml/plantuml[^./]+\.}, "plantuml/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
|
8
8
|
[plantuml]
|
@@ -53,7 +53,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it "processes the PlantUML macro with imagesdir" do
|
56
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
56
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)).gsub(%r{spec/assets/[^./]+\.}, "spec/assets/_."))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
57
57
|
= Document title
|
58
58
|
Author
|
59
59
|
:docfile: test.adoc
|
@@ -119,7 +119,7 @@ OUTPUT
|
|
119
119
|
it "processes the lutaml_diagram" do
|
120
120
|
expect(
|
121
121
|
xmlpp(
|
122
|
-
strip_guid(Asciidoctor.convert(input,
|
122
|
+
strip_guid(Asciidoctor.convert(input, *OPTIONS))
|
123
123
|
.gsub(%r{".+spec\/assets\/lutaml\/[^.\/]+\.}, %q("spec/assets/_.))))
|
124
124
|
.to(be_equivalent_to xmlpp(output))
|
125
125
|
end
|
@@ -187,14 +187,14 @@ OUTPUT
|
|
187
187
|
it "processes the lutaml_uml_attributes_table macro" do
|
188
188
|
expect(
|
189
189
|
xmlpp(
|
190
|
-
strip_guid(Asciidoctor.convert(input,
|
190
|
+
strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
191
191
|
.to(be_equivalent_to(xmlpp(output)))
|
192
192
|
end
|
193
193
|
end
|
194
194
|
|
195
195
|
it "processes the PlantUML macro with PlantUML disabled" do
|
196
196
|
mock_plantuml_disabled
|
197
|
-
expect { Asciidoctor.convert(<<~"INPUT",
|
197
|
+
expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to output(%r{PlantUML not installed}).to_stderr
|
198
198
|
#{ASCIIDOC_BLANK_HDR}
|
199
199
|
|
200
200
|
[plantuml]
|
@@ -210,7 +210,7 @@ OUTPUT
|
|
210
210
|
INPUT
|
211
211
|
|
212
212
|
mock_plantuml_disabled
|
213
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
213
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
214
214
|
#{ASCIIDOC_BLANK_HDR}
|
215
215
|
|
216
216
|
[plantuml]
|
@@ -240,7 +240,7 @@ Alice <-- Bob: another authentication Response
|
|
240
240
|
|
241
241
|
it "processes the PlantUML macro with localdir unwritable" do
|
242
242
|
mock_localdir_unwritable
|
243
|
-
expect { Asciidoctor.convert(<<~"INPUT",
|
243
|
+
expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to output(%r{not writable for PlantUML}).to_stderr
|
244
244
|
#{ASCIIDOC_BLANK_HDR}
|
245
245
|
|
246
246
|
[plantuml]
|
@@ -256,7 +256,7 @@ Alice <-- Bob: another authentication Response
|
|
256
256
|
INPUT
|
257
257
|
|
258
258
|
mock_localdir_unwritable
|
259
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
259
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
260
260
|
#{ASCIIDOC_BLANK_HDR}
|
261
261
|
|
262
262
|
[plantuml]
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::Standoc do
|
4
4
|
it "processes the Asciidoctor::Standoc inline macros" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
alt:[term1]
|
8
8
|
deprecated:[term1]
|
@@ -51,7 +51,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
51
51
|
end
|
52
52
|
|
53
53
|
it "processes the Asciidoctor::Standoc index macros" do
|
54
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
54
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
55
55
|
#{ASCIIDOC_BLANK_HDR}
|
56
56
|
index:also[]
|
57
57
|
index:see[A]
|
@@ -120,7 +120,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
120
120
|
end
|
121
121
|
|
122
122
|
it "processes the Asciidoctor::Standoc variant macros" do
|
123
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
123
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
124
124
|
#{ASCIIDOC_BLANK_HDR}
|
125
125
|
== lang:en[English] lang:fr-Latn[Français]
|
126
126
|
|
@@ -153,7 +153,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
153
153
|
end
|
154
154
|
|
155
155
|
it "processes the Asciidoctor::Standoc concept macros" do
|
156
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
156
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
157
157
|
#{ASCIIDOC_BLANK_HDR}
|
158
158
|
{{clause1}}
|
159
159
|
{{clause1,w\[o\]rd}}
|
@@ -303,7 +303,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
303
303
|
end
|
304
304
|
|
305
305
|
it "processes the TODO custom admonition" do
|
306
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
306
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
307
307
|
#{ASCIIDOC_BLANK_HDR}
|
308
308
|
TODO: Note1
|
309
309
|
|
@@ -330,7 +330,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
330
330
|
end
|
331
331
|
|
332
332
|
it "generates pseudocode examples, with formatting and initial indentation" do
|
333
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
333
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
334
334
|
#{ASCIIDOC_BLANK_HDR}
|
335
335
|
|
336
336
|
[pseudocode,subsequence="A",number="3",keep-with-next=true,keep-lines-together=true]
|
@@ -354,7 +354,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
354
354
|
end
|
355
355
|
|
356
356
|
it "supplies line breaks in pseudocode" do
|
357
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
357
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
358
358
|
#{ASCIIDOC_BLANK_HDR}
|
359
359
|
|
360
360
|
[pseudocode]
|
@@ -386,7 +386,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
386
386
|
end
|
387
387
|
|
388
388
|
it "skips embedded blocks when supplying line breaks in pseudocode" do
|
389
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
389
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
390
390
|
#{ASCIIDOC_BLANK_HDR}
|
391
391
|
|
392
392
|
[pseudocode]
|
@@ -452,7 +452,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
452
452
|
end
|
453
453
|
|
454
454
|
it "processes the Ruby markups" do
|
455
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
455
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
456
456
|
#{ASCIIDOC_BLANK_HDR}
|
457
457
|
|
458
458
|
ruby:楽聖少女[がくせいしょうじょ]
|
@@ -468,7 +468,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
468
468
|
end
|
469
469
|
|
470
470
|
it "processes the footnoteblock macro" do
|
471
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
471
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
472
472
|
#{ASCIIDOC_BLANK_HDR}
|
473
473
|
|
474
474
|
footnoteblock:[id1]
|
@@ -524,7 +524,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
524
524
|
end
|
525
525
|
|
526
526
|
it "processes the footnoteblock macro with failed reference" do
|
527
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
527
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
528
528
|
#{ASCIIDOC_BLANK_HDR}
|
529
529
|
|
530
530
|
footnoteblock:[id1]
|
@@ -581,7 +581,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
581
581
|
end
|
582
582
|
|
583
583
|
it "processes input form macros" do
|
584
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
584
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
585
585
|
#{ASCIIDOC_BLANK_HDR}
|
586
586
|
|
587
587
|
[form,id=N0,name=N1,action="/action_page.php"]
|
@@ -682,7 +682,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
682
682
|
xmlpp(
|
683
683
|
strip_guid(
|
684
684
|
Asciidoctor.convert(
|
685
|
-
input,
|
685
|
+
input, *OPTIONS
|
686
686
|
)
|
687
687
|
)
|
688
688
|
)
|
@@ -3,7 +3,7 @@ require "relaton_iso"
|
|
3
3
|
|
4
4
|
RSpec.describe Asciidoctor::Standoc do
|
5
5
|
it "processes simple dl reference" do
|
6
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
6
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
7
7
|
#{ASCIIDOC_BLANK_HDR}
|
8
8
|
[bibliography]
|
9
9
|
== Normative References
|
@@ -72,7 +72,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it "processes complex dl reference" do
|
75
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
75
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
76
76
|
#{ASCIIDOC_BLANK_HDR}
|
77
77
|
|
78
78
|
== Clause
|
@@ -455,7 +455,7 @@ OUTPUT
|
|
455
455
|
end
|
456
456
|
|
457
457
|
it "processes complex dl reference with dot path keys" do
|
458
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
458
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
459
459
|
#{ASCIIDOC_BLANK_HDR}
|
460
460
|
[bibliography]
|
461
461
|
== Normative References
|
@@ -773,7 +773,7 @@ OUTPUT
|
|
773
773
|
end
|
774
774
|
|
775
775
|
it "processes mix of dl and default references" do
|
776
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
776
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
777
777
|
#{ASCIIDOC_BLANK_HDR}
|
778
778
|
|
779
779
|
== Section
|
@@ -4,7 +4,7 @@ require "relaton_ietf"
|
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
6
|
it "processes simple ISO reference" do
|
7
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
7
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
8
8
|
#{ASCIIDOC_BLANK_HDR}
|
9
9
|
[bibliography]
|
10
10
|
== Normative References
|
@@ -47,7 +47,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it "processes simple ISO reference with date range" do
|
50
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
50
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
51
51
|
#{ASCIIDOC_BLANK_HDR}
|
52
52
|
[bibliography]
|
53
53
|
== Normative References
|
@@ -113,7 +113,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
113
113
|
* [[[iso123,ISO 123]]] _Standard_
|
114
114
|
* [[[iso124,(1)ISO 123]]] _Standard_
|
115
115
|
INPUT
|
116
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
116
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
117
117
|
#{BLANK_HDR}
|
118
118
|
<preface>
|
119
119
|
<foreword id='_' obligation='informative'>
|
@@ -219,12 +219,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
219
219
|
</references></bibliography>
|
220
220
|
</standard-document>
|
221
221
|
OUTPUT
|
222
|
-
expect { Asciidoctor.convert(input,
|
222
|
+
expect { Asciidoctor.convert(input, *OPTIONS) }.to output(/ERROR: No document identifier retrieved for ISO 123/).to_stderr
|
223
223
|
end
|
224
224
|
|
225
225
|
it "fetches simple ISO reference" do
|
226
226
|
VCR.use_cassette "isobib_get_123_1" do
|
227
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
227
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
228
228
|
#{ISOBIB_BLANK_HDR}
|
229
229
|
[bibliography]
|
230
230
|
== Normative References
|
@@ -461,7 +461,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
461
461
|
|
462
462
|
it "fetches simple ISO reference in French" do
|
463
463
|
VCR.use_cassette "isobib_get_123_1_fr" do
|
464
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
464
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
465
465
|
= Document title
|
466
466
|
Author
|
467
467
|
:docfile: test.adoc
|
@@ -720,7 +720,7 @@ compris les éventuels amendements).
|
|
720
720
|
end
|
721
721
|
|
722
722
|
it "processes simple IEC reference" do
|
723
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
723
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
724
724
|
#{ASCIIDOC_BLANK_HDR}
|
725
725
|
[bibliography]
|
726
726
|
== Normative References
|
@@ -766,7 +766,7 @@ compris les éventuels amendements).
|
|
766
766
|
# mock_isobib_get_iec12382
|
767
767
|
# mock_isobib_get_124
|
768
768
|
VCR.use_cassette "dated_iso_ref_joint_iso_iec" do
|
769
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
769
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
770
770
|
#{ISOBIB_BLANK_HDR}
|
771
771
|
[bibliography]
|
772
772
|
== Normative References
|
@@ -977,7 +977,7 @@ compris les éventuels amendements).
|
|
977
977
|
|
978
978
|
it "declines to fetch individual references" do
|
979
979
|
VCR.use_cassette "dated_iso_ref_joint_iso_iec" do
|
980
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
980
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
981
981
|
#{ISOBIB_BLANK_HDR}
|
982
982
|
[bibliography]
|
983
983
|
== Normative References
|
@@ -1051,7 +1051,7 @@ OUTPUT
|
|
1051
1051
|
it "processes draft ISO reference" do
|
1052
1052
|
#stub_fetch_ref no_year: true, note: "The standard is in press"
|
1053
1053
|
|
1054
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1054
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1055
1055
|
#{ASCIIDOC_BLANK_HDR}
|
1056
1056
|
[bibliography]
|
1057
1057
|
== Normative References
|
@@ -1134,7 +1134,7 @@ OUTPUT
|
|
1134
1134
|
it "processes all-parts ISO reference" do
|
1135
1135
|
#stub_fetch_ref(all_parts: true)
|
1136
1136
|
|
1137
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1137
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1138
1138
|
#{ASCIIDOC_BLANK_HDR}
|
1139
1139
|
[bibliography]
|
1140
1140
|
== Normative References
|
@@ -1191,7 +1191,7 @@ OUTPUT
|
|
1191
1191
|
it "processes RFC reference in Normative References" do
|
1192
1192
|
# mock_rfcbib_get_rfc8341
|
1193
1193
|
VCR.use_cassette "rfcbib_get_rfc8341" do
|
1194
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1194
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1195
1195
|
#{ISOBIB_BLANK_HDR}
|
1196
1196
|
[bibliography]
|
1197
1197
|
== Normative References
|
@@ -1363,7 +1363,7 @@ OUTPUT
|
|
1363
1363
|
end
|
1364
1364
|
|
1365
1365
|
it "processes non-ISO reference in Normative References" do
|
1366
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1366
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1367
1367
|
#{ASCIIDOC_BLANK_HDR}
|
1368
1368
|
[bibliography]
|
1369
1369
|
== Normative References
|
@@ -1399,7 +1399,7 @@ OUTPUT
|
|
1399
1399
|
end
|
1400
1400
|
|
1401
1401
|
it "processes non-ISO reference in Bibliography" do
|
1402
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1402
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1403
1403
|
#{ASCIIDOC_BLANK_HDR}
|
1404
1404
|
[bibliography]
|
1405
1405
|
== Bibliography
|
@@ -1454,7 +1454,7 @@ OUTPUT
|
|
1454
1454
|
expect(RelatonIso::IsoBibliography).to receive(:search).with("ISO 123") do
|
1455
1455
|
raise RelatonBib::RequestError.new "getaddrinfo"
|
1456
1456
|
end.at_least :once
|
1457
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1457
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1458
1458
|
#{ISOBIB_BLANK_HDR}
|
1459
1459
|
[bibliography]
|
1460
1460
|
== Normative References
|
@@ -1510,7 +1510,7 @@ OUTPUT
|
|
1510
1510
|
end
|
1511
1511
|
|
1512
1512
|
it "processes repository reference" do
|
1513
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1513
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1514
1514
|
#{ISOBIB_BLANK_HDR}
|
1515
1515
|
== Scope
|
1516
1516
|
|
@@ -1581,7 +1581,7 @@ OUTPUT
|
|
1581
1581
|
end
|
1582
1582
|
|
1583
1583
|
it "processes hyperlink reference, ingest RXL or XML if available" do
|
1584
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1584
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1585
1585
|
#{ISOBIB_BLANK_HDR}
|
1586
1586
|
== Scope
|
1587
1587
|
|
@@ -1773,7 +1773,7 @@ OUTPUT
|
|
1773
1773
|
it "overrides normative status of bibliographies" do
|
1774
1774
|
mock_isobib_get_123_no_docid(1)
|
1775
1775
|
mock_isobib_get_123_no_docid_lbl(1)
|
1776
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
1776
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp( <<~"OUTPUT")
|
1777
1777
|
#{ISOBIB_BLANK_HDR}
|
1778
1778
|
[bibliography,normative=false]
|
1779
1779
|
== Normative References
|