metanorma-iso 1.5.13 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +17 -0
- data/lib/asciidoctor/iso/base.rb +1 -6
- data/lib/asciidoctor/iso/basicdoc.rng +52 -3
- data/lib/asciidoctor/iso/cleanup.rb +0 -6
- data/lib/asciidoctor/iso/front.rb +5 -5
- data/lib/asciidoctor/iso/isodoc.rng +114 -3
- data/lib/asciidoctor/iso/isostandard-amd.rng +8 -4
- data/lib/asciidoctor/iso/isostandard.rng +19 -10
- data/lib/asciidoctor/iso/validate.rb +78 -0
- data/lib/asciidoctor/iso/validate_section.rb +12 -9
- data/lib/isodoc/iso/html/header.html +12 -12
- data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html_convert.rb +2 -2
- data/lib/isodoc/iso/i18n-en.yaml +2 -0
- data/lib/isodoc/iso/i18n-fr.yaml +1 -1
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +486 -206
- data/lib/isodoc/iso/iso.international-standard.xsl +486 -206
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +2 -2
- data/lib/isodoc/iso/xref.rb +28 -12
- data/lib/metanorma/iso/processor.rb +11 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +14 -14
- data/spec/asciidoctor-iso/base_spec.rb +20 -20
- data/spec/asciidoctor-iso/blocks_spec.rb +21 -21
- data/spec/asciidoctor-iso/cleanup_spec.rb +32 -26
- data/spec/asciidoctor-iso/inline_spec.rb +7 -7
- data/spec/asciidoctor-iso/lists_spec.rb +3 -3
- data/spec/asciidoctor-iso/refs_spec.rb +4 -4
- data/spec/asciidoctor-iso/section_spec.rb +7 -7
- data/spec/asciidoctor-iso/table_spec.rb +4 -4
- data/spec/asciidoctor-iso/validate_spec.rb +457 -87
- data/spec/isodoc/amd_spec.rb +13 -13
- data/spec/isodoc/iso_spec.rb +2 -2
- data/spec/isodoc/postproc_spec.rb +1 -0
- data/spec/spec_helper.rb +12 -0
- metadata +7 -11
- data/lib/asciidoctor/iso/macros.rb +0 -21
- data/lib/asciidoctor/iso/term_lookup_cleanup.rb +0 -86
- data/lib/metanorma/iso/fonts_manifest.yaml +0 -6
- data/spec/asciidoctor-iso/macros_spec.rb +0 -310
@@ -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(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: 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(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
20
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
21
21
|
#{ASCIIDOC_BLANK_HDR}
|
22
22
|
== Terms and Definitions
|
23
23
|
|
@@ -53,7 +53,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it "moves term domains out of the term definition paragraph" do
|
56
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
56
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
57
57
|
#{ASCIIDOC_BLANK_HDR}
|
58
58
|
== Terms and Definitions
|
59
59
|
|
@@ -77,7 +77,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
it "permits multiple blocks in term definition paragraph" do
|
80
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
80
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
81
81
|
= Document title
|
82
82
|
Author
|
83
83
|
:docfile: test.adoc
|
@@ -124,8 +124,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
124
124
|
OUTPUT
|
125
125
|
end
|
126
126
|
|
127
|
-
it "
|
128
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
127
|
+
it "keeps any initial boilerplate from terms and definitions" do
|
128
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
129
129
|
#{ASCIIDOC_BLANK_HDR}
|
130
130
|
== Terms and Definitions
|
131
131
|
|
@@ -142,6 +142,12 @@ RSpec.describe Asciidoctor::ISO do
|
|
142
142
|
<terms id="_" obligation="normative"><title>Terms and definitions</title>
|
143
143
|
|
144
144
|
#{TERM_BOILERPLATE}
|
145
|
+
<p id='_'>I am boilerplate</p>
|
146
|
+
<ul id='_'>
|
147
|
+
<li>
|
148
|
+
<p id='_'>So am I</p>
|
149
|
+
</li>
|
150
|
+
</ul>
|
145
151
|
<term id="term-time">
|
146
152
|
<preferred>Time</preferred>
|
147
153
|
<definition><p id="_">This paragraph is extraneous</p></definition>
|
@@ -152,7 +158,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
152
158
|
end
|
153
159
|
|
154
160
|
it "moves notes inside preceding blocks, if they are not at clause end, and the blocks are not delimited" do
|
155
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
161
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
156
162
|
#{ASCIIDOC_BLANK_HDR}
|
157
163
|
[stem]
|
158
164
|
++++
|
@@ -177,7 +183,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
177
183
|
end
|
178
184
|
|
179
185
|
it "does not move notes inside preceding blocks, if they are at clause end" do
|
180
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
186
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
181
187
|
#{ASCIIDOC_BLANK_HDR}
|
182
188
|
[source,ruby]
|
183
189
|
[1...x].each do |y|
|
@@ -198,7 +204,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
198
204
|
end
|
199
205
|
|
200
206
|
it "converts xrefs to references into erefs" do
|
201
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
207
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
202
208
|
#{ASCIIDOC_BLANK_HDR}
|
203
209
|
<<iso216>>
|
204
210
|
|
@@ -238,7 +244,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
238
244
|
end
|
239
245
|
|
240
246
|
it "extracts localities from erefs" do
|
241
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
247
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
242
248
|
#{ASCIIDOC_BLANK_HDR}
|
243
249
|
<<iso216,whole,clause=3,example=9-11,locality:prelude=33,locality:entirety:the reference>>
|
244
250
|
|
@@ -279,7 +285,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
279
285
|
|
280
286
|
|
281
287
|
it "strips type from xrefs" do
|
282
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
288
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
283
289
|
#{ASCIIDOC_BLANK_HDR}
|
284
290
|
<<iso216>>
|
285
291
|
|
@@ -315,7 +321,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
315
321
|
end
|
316
322
|
|
317
323
|
it "processes localities in term sources" do
|
318
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
324
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
319
325
|
#{ASCIIDOC_BLANK_HDR}
|
320
326
|
== Terms and Definitions
|
321
327
|
|
@@ -346,7 +352,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
346
352
|
end
|
347
353
|
|
348
354
|
it "removes extraneous material from Normative References" do
|
349
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
355
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
350
356
|
#{ASCIIDOC_BLANK_HDR}
|
351
357
|
[bibliography]
|
352
358
|
== Normative References
|
@@ -378,7 +384,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
378
384
|
end
|
379
385
|
|
380
386
|
it "inserts IDs into paragraphs" do
|
381
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
387
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
382
388
|
#{ASCIIDOC_BLANK_HDR}
|
383
389
|
Paragraph
|
384
390
|
INPUT
|
@@ -391,7 +397,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
391
397
|
end
|
392
398
|
|
393
399
|
it "inserts IDs into notes" do
|
394
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
400
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
395
401
|
#{ASCIIDOC_BLANK_HDR}
|
396
402
|
[example]
|
397
403
|
====
|
@@ -411,7 +417,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
411
417
|
end
|
412
418
|
|
413
419
|
it "moves table key inside table" do
|
414
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
420
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
415
421
|
#{ASCIIDOC_BLANK_HDR}
|
416
422
|
|===
|
417
423
|
|a |b |c
|
@@ -443,7 +449,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
443
449
|
end
|
444
450
|
|
445
451
|
it "processes headerrows attribute for table without header rows" do
|
446
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
452
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
447
453
|
#{ASCIIDOC_BLANK_HDR}
|
448
454
|
[headerrows=3]
|
449
455
|
|===
|
@@ -482,7 +488,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
482
488
|
end
|
483
489
|
|
484
490
|
it "processes headerrows attribute for table with header rows" do
|
485
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
491
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
486
492
|
#{ASCIIDOC_BLANK_HDR}
|
487
493
|
[headerrows=3]
|
488
494
|
|===
|
@@ -527,7 +533,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
527
533
|
end
|
528
534
|
|
529
535
|
it "moves table notes inside table" do
|
530
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
536
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
531
537
|
#{ASCIIDOC_BLANK_HDR}
|
532
538
|
|===
|
533
539
|
|a |b |c
|
@@ -558,7 +564,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
558
564
|
end
|
559
565
|
|
560
566
|
it "moves formula key inside formula" do
|
561
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
567
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
562
568
|
#{ASCIIDOC_BLANK_HDR}
|
563
569
|
[stem]
|
564
570
|
++++
|
@@ -585,7 +591,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
585
591
|
end
|
586
592
|
|
587
593
|
it "moves footnotes inside figures" do
|
588
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
594
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
589
595
|
#{ASCIIDOC_BLANK_HDR}
|
590
596
|
image::spec/examples/rice_images/rice_image1.png[]
|
591
597
|
|
@@ -609,7 +615,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
609
615
|
end
|
610
616
|
|
611
617
|
it "moves figure key inside figure" do
|
612
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
618
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
613
619
|
#{ASCIIDOC_BLANK_HDR}
|
614
620
|
image::spec/examples/rice_images/rice_image1.png[]
|
615
621
|
|
@@ -634,7 +640,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
634
640
|
end
|
635
641
|
|
636
642
|
it "numbers bibliographic notes and footnotes sequentially" do
|
637
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
643
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
638
644
|
#{ASCIIDOC_BLANK_HDR}
|
639
645
|
footnote:[Footnote]
|
640
646
|
|
@@ -687,7 +693,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
687
693
|
end
|
688
694
|
|
689
695
|
it "defaults section obligations" do
|
690
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
696
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
691
697
|
#{ASCIIDOC_BLANK_HDR}
|
692
698
|
|
693
699
|
== Clause
|
@@ -712,7 +718,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
712
718
|
end
|
713
719
|
|
714
720
|
it "extends clause levels past 5" do
|
715
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
721
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
716
722
|
#{ASCIIDOC_BLANK_HDR}
|
717
723
|
|
718
724
|
== Clause1
|
@@ -775,7 +781,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
775
781
|
end
|
776
782
|
|
777
783
|
it "reorders references in bibliography, and renumbers citations accordingly" do
|
778
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
784
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
779
785
|
#{ASCIIDOC_BLANK_HDR}
|
780
786
|
|
781
787
|
== 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(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
_emphasis_
|
8
8
|
*strong*
|
@@ -47,7 +47,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it "processes breaks" do
|
50
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
50
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
51
51
|
#{ASCIIDOC_BLANK_HDR}
|
52
52
|
Line break +
|
53
53
|
line break
|
@@ -66,7 +66,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
it "processes links" do
|
69
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
69
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
70
70
|
#{ASCIIDOC_BLANK_HDR}
|
71
71
|
mailto:fred@example.com
|
72
72
|
http://example.com[]
|
@@ -83,7 +83,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
83
83
|
end
|
84
84
|
|
85
85
|
it "processes bookmarks" do
|
86
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
86
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
87
87
|
#{ASCIIDOC_BLANK_HDR}
|
88
88
|
Text [[bookmark]] Text
|
89
89
|
INPUT
|
@@ -96,7 +96,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
96
96
|
end
|
97
97
|
|
98
98
|
it "processes crossreferences" do
|
99
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
99
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
100
100
|
#{ASCIIDOC_BLANK_HDR}
|
101
101
|
[[reference]]
|
102
102
|
== Section
|
@@ -121,7 +121,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
121
121
|
end
|
122
122
|
|
123
123
|
it "processes bibliographic anchors" do
|
124
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
124
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
125
125
|
#{ASCIIDOC_BLANK_HDR}
|
126
126
|
[bibliography]
|
127
127
|
== Normative References
|
@@ -152,7 +152,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
152
152
|
end
|
153
153
|
|
154
154
|
it "processes footnotes" do
|
155
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
155
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
156
156
|
#{ASCIIDOC_BLANK_HDR}
|
157
157
|
Hello!footnote:[Footnote text]
|
158
158
|
INPUT
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "processes simple lists" do
|
5
|
-
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
5
|
+
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
* List 1
|
8
8
|
* List 2
|
@@ -57,7 +57,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it "processes complex lists" do
|
60
|
-
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
60
|
+
output = Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
61
61
|
#{ASCIIDOC_BLANK_HDR}
|
62
62
|
[[id]]
|
63
63
|
* First
|
@@ -165,7 +165,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
165
165
|
end
|
166
166
|
|
167
167
|
it "anchors lists and list items" do
|
168
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
168
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
169
169
|
#{ASCIIDOC_BLANK_HDR}
|
170
170
|
[[id1]]
|
171
171
|
* [[id2]] List item
|
@@ -6,7 +6,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
6
6
|
it "processes draft ISO reference" do
|
7
7
|
mock_fdis
|
8
8
|
#mock_isobib_get_123
|
9
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
9
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
10
10
|
#{ISOBIB_BLANK_HDR}
|
11
11
|
== Clause
|
12
12
|
<<iso123>>
|
@@ -182,7 +182,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
182
182
|
it "processes all-parts ISO reference" do
|
183
183
|
#stub_fetch_ref(all_parts: true)
|
184
184
|
|
185
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
185
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
186
186
|
#{ASCIIDOC_BLANK_HDR}
|
187
187
|
|
188
188
|
== Clause
|
@@ -229,7 +229,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
229
229
|
end
|
230
230
|
|
231
231
|
it "processes non-ISO reference in Normative References" do
|
232
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
232
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
233
233
|
#{ASCIIDOC_BLANK_HDR}
|
234
234
|
[bibliography]
|
235
235
|
== Normative References
|
@@ -256,7 +256,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
256
256
|
end
|
257
257
|
|
258
258
|
it "processes non-ISO reference in Bibliography" do
|
259
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
259
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
260
260
|
#{ASCIIDOC_BLANK_HDR}
|
261
261
|
[bibliography]
|
262
262
|
== Bibliography
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "processes sections" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
== Foreword
|
8
8
|
|
@@ -156,7 +156,7 @@ standardization at the following addresses:</p>
|
|
156
156
|
end
|
157
157
|
|
158
158
|
it "processes section obligations" do
|
159
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
159
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
160
160
|
#{ASCIIDOC_BLANK_HDR}
|
161
161
|
[obligation=informative]
|
162
162
|
== Clause 1
|
@@ -187,7 +187,7 @@ standardization at the following addresses:</p>
|
|
187
187
|
end
|
188
188
|
|
189
189
|
it "processes inline headers" do
|
190
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
190
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
191
191
|
#{ASCIIDOC_BLANK_HDR}
|
192
192
|
== Clause 1
|
193
193
|
|
@@ -218,7 +218,7 @@ standardization at the following addresses:</p>
|
|
218
218
|
end
|
219
219
|
|
220
220
|
it "processes blank headers" do
|
221
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
221
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
222
222
|
#{ASCIIDOC_BLANK_HDR}
|
223
223
|
== Clause 1
|
224
224
|
|
@@ -238,7 +238,7 @@ standardization at the following addresses:</p>
|
|
238
238
|
end
|
239
239
|
|
240
240
|
it "processes terms & definitions with external source" do
|
241
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
241
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
242
242
|
#{ASCIIDOC_BLANK_HDR}
|
243
243
|
|
244
244
|
Foreword
|
@@ -277,7 +277,7 @@ standardization at the following addresses:</p>
|
|
277
277
|
end
|
278
278
|
|
279
279
|
it "processes empty terms & definitions" do
|
280
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
280
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
281
281
|
#{ASCIIDOC_BLANK_HDR}
|
282
282
|
|
283
283
|
Foreword
|
@@ -323,7 +323,7 @@ standardization at the following addresses:</p>
|
|
323
323
|
end
|
324
324
|
|
325
325
|
it "processes empty terms & definitions with external source" do
|
326
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
326
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
327
327
|
#{ASCIIDOC_BLANK_HDR}
|
328
328
|
|
329
329
|
Foreword
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::ISO do
|
4
4
|
it "processes basic tables" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
.Table Name
|
8
8
|
|===
|
@@ -36,7 +36,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "inserts header rows in a table with a name and no header" do
|
39
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
39
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
40
40
|
#{ASCIIDOC_BLANK_HDR}
|
41
41
|
[headerrows=2]
|
42
42
|
.Table Name
|
@@ -76,7 +76,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
76
76
|
|
77
77
|
|
78
78
|
it "inserts header rows in a table without a name and no header" do
|
79
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
79
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
80
80
|
#{ASCIIDOC_BLANK_HDR}
|
81
81
|
[headerrows=2]
|
82
82
|
|===
|
@@ -112,7 +112,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
112
112
|
end
|
113
113
|
|
114
114
|
it "processes complex tables" do
|
115
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
115
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
116
116
|
#{ASCIIDOC_BLANK_HDR}
|
117
117
|
[cols="<,^,^,^,^",options="header,footer",headerrows=2]
|
118
118
|
.Maximum permissible mass fraction of defects
|
@@ -15,17 +15,88 @@ RSpec.describe Asciidoctor::ISO do
|
|
15
15
|
|
16
16
|
it "generates error file" do
|
17
17
|
expect do
|
18
|
+
mock_pdf
|
19
|
+
mock_sts
|
18
20
|
Metanorma::Compile
|
19
21
|
.new
|
20
|
-
.compile("spec/assets/xref_error.adoc", type: "iso")
|
22
|
+
.compile("spec/assets/xref_error.adoc", type: "iso", :"agree-to-terms" => true)
|
21
23
|
end.to(change { File.exist?("spec/assets/xref_error.err") }
|
22
24
|
.from(false).to(true))
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
28
|
+
it "Warns of image names not compliant with DRG" do
|
29
|
+
FileUtils.rm_f "test.err"
|
30
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
31
|
+
= Document title
|
32
|
+
Author
|
33
|
+
:docfile: test.adoc
|
34
|
+
:nodoc:
|
35
|
+
:no-isobib:
|
36
|
+
:docnumber: 1000
|
37
|
+
:partnumber: 1
|
38
|
+
:edition: 2
|
39
|
+
:amendment-number: 3
|
40
|
+
|
41
|
+
.Split-it-right sample divider
|
42
|
+
image::spec/examples/rice_images/rice_image1.png[]
|
43
|
+
image::spec/examples/rice_images/SL1000-1_ed2amd3fig1.png[]
|
44
|
+
image::spec/examples/rice_images/1001_ed2amd3fig1.png[]
|
45
|
+
image::spec/examples/rice_images/ISO_1213_1.png[]
|
46
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figA.png[]
|
47
|
+
|
48
|
+
|===
|
49
|
+
|a |b
|
50
|
+
|
51
|
+
a|image::spec/examples/rice_images/1000-1_ed2amd3figTab1.png[]
|
52
|
+
a|image::spec/examples/rice_images/1000-1_ed2amd3fig2.png[]
|
53
|
+
|===
|
54
|
+
|
55
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figTab2.png[]
|
56
|
+
|
57
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figA1.png[]
|
58
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig1a.png[]
|
59
|
+
|
60
|
+
.Stages of gelatinization
|
61
|
+
====
|
62
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig1b.png[]
|
63
|
+
|
64
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig4.png[]
|
65
|
+
====
|
66
|
+
|
67
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig5_f.png[]
|
68
|
+
|
69
|
+
[appendix]
|
70
|
+
== Annex
|
71
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figA2.png[]
|
72
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig3.png[]
|
73
|
+
|
74
|
+
INPUT
|
75
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/rice_image1.png does not match DRG requirements: expect 1000-1_ed2amd3fig"
|
76
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1001_ed2amd3fig1.png does not match DRG requirements: expect 1000-1_ed2amd3fig"
|
77
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/SL1000-1_ed2amd3fig1.png does not match DRG requirements: expect 1000-1_ed2amd3fig"
|
78
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/ISO_1213_1.png does not match DRG requirements: expect 1000-1_ed2amd3fig"
|
79
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3figA.png does not match DRG requirements"
|
80
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3figTab1.png does not match DRG requirements"
|
81
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3figTab1.png is under a table but is not so labelled"
|
82
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3fig2.png is under a table but is not so labelled"
|
83
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3figTab2.png is labelled as under a table but is not"
|
84
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png is labelled as under a table but is not"
|
85
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3figA2.png is under an annex but is not so labelled"
|
86
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3fig3.png is under an annex but is not so labelled"
|
87
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3figA1.png is labelled as under an annex but is not"
|
88
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png is labelled as under an annex but is not"
|
89
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3fig1b.png has a subfigure letter but is not a subfigure"
|
90
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3fig4.png does not have a subfigure letter but is a subfigure"
|
91
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3fig1a.png has a subfigure letter but is not a subfigure"
|
92
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png has a subfigure letter but is not a subfigure"
|
93
|
+
expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3fig5_f.png expected to have suffix _e"
|
94
|
+
expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png expected to have suffix _e"
|
95
|
+
end
|
96
|
+
|
26
97
|
it "Warns of missing scope" do
|
27
98
|
FileUtils.rm_f "test.err"
|
28
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
99
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
29
100
|
= Document title
|
30
101
|
Author
|
31
102
|
:docfile: test.adoc
|
@@ -36,8 +107,9 @@ it "Warns of missing scope" do
|
|
36
107
|
text
|
37
108
|
INPUT
|
38
109
|
expect(File.read("test.err")).to include "Scope clause missing"
|
110
|
+
|
39
111
|
FileUtils.rm_f "test.err"
|
40
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
112
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
41
113
|
= Document title
|
42
114
|
Author
|
43
115
|
:docfile: test.adoc
|
@@ -49,11 +121,23 @@ it "Warns of missing scope" do
|
|
49
121
|
INPUT
|
50
122
|
expect(File.read("test.err")).not_to include "Scope clause missing"
|
51
123
|
|
124
|
+
FileUtils.rm_f "test.err"
|
125
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
126
|
+
= Document title
|
127
|
+
Author
|
128
|
+
:docfile: test.adoc
|
129
|
+
:nodoc:
|
130
|
+
:no-isobib:
|
131
|
+
:doctype: amendment
|
132
|
+
|
133
|
+
text
|
134
|
+
INPUT
|
135
|
+
expect(File.read("test.err")).not_to include "Scope clause missing"
|
52
136
|
end
|
53
137
|
|
54
138
|
it "Warns of missing normative references" do
|
55
139
|
FileUtils.rm_f "test.err"
|
56
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
140
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
57
141
|
= Document title
|
58
142
|
Author
|
59
143
|
:docfile: test.adoc
|
@@ -64,8 +148,9 @@ it "Warns of missing normative references" do
|
|
64
148
|
text
|
65
149
|
INPUT
|
66
150
|
expect(File.read("test.err")).to include "Normative references missing"
|
151
|
+
|
67
152
|
FileUtils.rm_f "test.err"
|
68
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
153
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
69
154
|
= Document title
|
70
155
|
Author
|
71
156
|
:docfile: test.adoc
|
@@ -78,11 +163,24 @@ it "Warns of missing normative references" do
|
|
78
163
|
INPUT
|
79
164
|
expect(File.read("test.err")).not_to include "Normative references missing"
|
80
165
|
|
166
|
+
FileUtils.rm_f "test.err"
|
167
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
168
|
+
= Document title
|
169
|
+
Author
|
170
|
+
:docfile: test.adoc
|
171
|
+
:nodoc:
|
172
|
+
:no-isobib:
|
173
|
+
:doctype: amendment
|
174
|
+
|
175
|
+
text
|
176
|
+
INPUT
|
177
|
+
expect(File.read("test.err")).not_to include "Normative references missing"
|
178
|
+
|
81
179
|
end
|
82
180
|
|
83
181
|
it "Warns of missing terms & definitions" do
|
84
182
|
FileUtils.rm_f "test.err"
|
85
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
183
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
86
184
|
= Document title
|
87
185
|
Author
|
88
186
|
:docfile: test.adoc
|
@@ -93,8 +191,9 @@ it "Warns of missing terms & definitions" do
|
|
93
191
|
text
|
94
192
|
INPUT
|
95
193
|
expect(File.read("test.err")).to include "Terms & definitions missing"
|
194
|
+
|
96
195
|
FileUtils.rm_f "test.err"
|
97
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
196
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
98
197
|
= Document title
|
99
198
|
Author
|
100
199
|
:docfile: test.adoc
|
@@ -107,12 +206,23 @@ it "Warns of missing terms & definitions" do
|
|
107
206
|
INPUT
|
108
207
|
expect(File.read("test.err")).not_to include "Terms & definitions missing"
|
109
208
|
|
110
|
-
|
209
|
+
FileUtils.rm_f "test.err"
|
210
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
211
|
+
= Document title
|
212
|
+
Author
|
213
|
+
:docfile: test.adoc
|
214
|
+
:nodoc:
|
215
|
+
:no-isobib:
|
216
|
+
:doctype: amendment
|
111
217
|
|
218
|
+
text
|
219
|
+
INPUT
|
220
|
+
expect(File.read("test.err")).not_to include "Terms & definitions missing"
|
221
|
+
end
|
112
222
|
|
113
223
|
it "Warns of illegal doctype" do
|
114
224
|
FileUtils.rm_f "test.err"
|
115
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
225
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
116
226
|
= Document title
|
117
227
|
Author
|
118
228
|
:docfile: test.adoc
|
@@ -127,7 +237,7 @@ end
|
|
127
237
|
|
128
238
|
it "Warns of illegal script" do
|
129
239
|
FileUtils.rm_f "test.err"
|
130
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
240
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
131
241
|
= Document title
|
132
242
|
Author
|
133
243
|
:docfile: test.adoc
|
@@ -142,7 +252,7 @@ end
|
|
142
252
|
|
143
253
|
it "Warns of illegal stage" do
|
144
254
|
FileUtils.rm_f "test.err"
|
145
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
255
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
146
256
|
= Document title
|
147
257
|
Author
|
148
258
|
:docfile: test.adoc
|
@@ -157,7 +267,7 @@ end
|
|
157
267
|
|
158
268
|
it "Warns of illegal substage" do
|
159
269
|
FileUtils.rm_f "test.err"
|
160
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
270
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
161
271
|
= Document title
|
162
272
|
Author
|
163
273
|
:docfile: test.adoc
|
@@ -173,7 +283,7 @@ end
|
|
173
283
|
|
174
284
|
it "Warns of illegal iteration" do
|
175
285
|
FileUtils.rm_f "test.err"
|
176
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
286
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
177
287
|
= Document title
|
178
288
|
Author
|
179
289
|
:docfile: test.adoc
|
@@ -189,7 +299,7 @@ end
|
|
189
299
|
|
190
300
|
it "Warns of illegal script" do
|
191
301
|
FileUtils.rm_f "test.err"
|
192
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
302
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
193
303
|
= Document title
|
194
304
|
Author
|
195
305
|
:docfile: test.adoc
|
@@ -204,7 +314,7 @@ end
|
|
204
314
|
|
205
315
|
it "warns that technical report may contain requirement" do
|
206
316
|
FileUtils.rm_f "test.err"
|
207
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
317
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
208
318
|
= Document title
|
209
319
|
Author
|
210
320
|
:docfile: test.adoc
|
@@ -222,7 +332,7 @@ end
|
|
222
332
|
|
223
333
|
it "warns that introduction may contain requirement" do
|
224
334
|
FileUtils.rm_f "test.err"
|
225
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
335
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
226
336
|
#{VALIDATING_BLANK_HDR}
|
227
337
|
== Introduction
|
228
338
|
|
@@ -233,7 +343,7 @@ end
|
|
233
343
|
|
234
344
|
it "warns that foreword may contain recommendation" do
|
235
345
|
FileUtils.rm_f "test.err"
|
236
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
346
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
237
347
|
#{VALIDATING_BLANK_HDR}
|
238
348
|
|
239
349
|
It is not recommended that widgets should be larger than 15 cm.
|
@@ -245,7 +355,7 @@ end
|
|
245
355
|
|
246
356
|
it "warns that foreword may contain permission" do
|
247
357
|
FileUtils.rm_f "test.err"
|
248
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
358
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
249
359
|
#{VALIDATING_BLANK_HDR}
|
250
360
|
|
251
361
|
No widget is required to be larger than 15 cm.
|
@@ -257,7 +367,7 @@ end
|
|
257
367
|
|
258
368
|
it "warns that scope may contain recommendation" do
|
259
369
|
FileUtils.rm_f "test.err"
|
260
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
370
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
261
371
|
#{VALIDATING_BLANK_HDR}
|
262
372
|
|
263
373
|
== Scope
|
@@ -268,7 +378,7 @@ end
|
|
268
378
|
|
269
379
|
it "warns that definition may contain requirement" do
|
270
380
|
FileUtils.rm_f "test.err"
|
271
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
381
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
272
382
|
#{VALIDATING_BLANK_HDR}
|
273
383
|
|
274
384
|
== Terms and Definitions
|
@@ -283,7 +393,7 @@ end
|
|
283
393
|
|
284
394
|
it "warns that term example may contain recommendation" do
|
285
395
|
FileUtils.rm_f "test.err"
|
286
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
396
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
287
397
|
#{VALIDATING_BLANK_HDR}
|
288
398
|
|
289
399
|
== Terms and Definitions
|
@@ -298,7 +408,7 @@ end
|
|
298
408
|
|
299
409
|
it "warns that note may contain recommendation" do
|
300
410
|
FileUtils.rm_f "test.err"
|
301
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
411
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
302
412
|
#{VALIDATING_BLANK_HDR}
|
303
413
|
|
304
414
|
NOTE: It is not recommended that widgets should be larger than 15 cm.
|
@@ -308,7 +418,7 @@ end
|
|
308
418
|
|
309
419
|
it "warns that footnote may contain recommendation" do
|
310
420
|
FileUtils.rm_f "test.err"
|
311
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
421
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
312
422
|
#{VALIDATING_BLANK_HDR}
|
313
423
|
|
314
424
|
footnote:[It is not recommended that widgets should be larger than 15 cm.]
|
@@ -318,7 +428,7 @@ end
|
|
318
428
|
|
319
429
|
it "warns that term source is not in expected format" do
|
320
430
|
FileUtils.rm_f "test.err"
|
321
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
431
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
322
432
|
#{VALIDATING_BLANK_HDR}
|
323
433
|
|
324
434
|
[.source]
|
@@ -329,7 +439,7 @@ end
|
|
329
439
|
|
330
440
|
it "warns that figure does not have title" do
|
331
441
|
FileUtils.rm_f "test.err"
|
332
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
442
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
333
443
|
#{VALIDATING_BLANK_HDR}
|
334
444
|
|
335
445
|
image::spec/examples/rice_images/rice_image1.png[]
|
@@ -339,7 +449,7 @@ end
|
|
339
449
|
|
340
450
|
it "warns that callouts do not match annotations" do
|
341
451
|
FileUtils.rm_f "test.err"
|
342
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
452
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
343
453
|
#{VALIDATING_BLANK_HDR}
|
344
454
|
[source,ruby]
|
345
455
|
--
|
@@ -356,7 +466,7 @@ end
|
|
356
466
|
|
357
467
|
it "warns that term source is not a real reference" do
|
358
468
|
FileUtils.rm_f "test.err"
|
359
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
469
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
360
470
|
#{VALIDATING_BLANK_HDR}
|
361
471
|
|
362
472
|
[.source]
|
@@ -367,7 +477,7 @@ end
|
|
367
477
|
|
368
478
|
it "warns that undated reference has locality" do
|
369
479
|
FileUtils.rm_f "test.err"
|
370
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
480
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
371
481
|
#{VALIDATING_BLANK_HDR}
|
372
482
|
|
373
483
|
== Scope
|
@@ -382,7 +492,7 @@ end
|
|
382
492
|
|
383
493
|
it "do not warn that undated reference which is a bibliographic reference has locality" do
|
384
494
|
FileUtils.rm_f "test.err"
|
385
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
495
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
386
496
|
#{VALIDATING_BLANK_HDR}
|
387
497
|
|
388
498
|
== Scope
|
@@ -397,7 +507,7 @@ end
|
|
397
507
|
|
398
508
|
it "do not warn that undated IEV reference has locality" do
|
399
509
|
FileUtils.rm_f "test.err"
|
400
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
510
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
401
511
|
#{VALIDATING_BLANK_HDR}
|
402
512
|
|
403
513
|
== Scope
|
@@ -412,7 +522,7 @@ end
|
|
412
522
|
|
413
523
|
it "do not warn that in print has locality" do
|
414
524
|
FileUtils.rm_f "test.err"
|
415
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
525
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
416
526
|
#{VALIDATING_BLANK_HDR}
|
417
527
|
|
418
528
|
== Scope
|
@@ -427,7 +537,7 @@ end
|
|
427
537
|
|
428
538
|
it "warns of Non-reference in bibliography" do
|
429
539
|
FileUtils.rm_f "test.err"
|
430
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
540
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
431
541
|
#{VALIDATING_BLANK_HDR}
|
432
542
|
|
433
543
|
== Normative References
|
@@ -438,7 +548,7 @@ end
|
|
438
548
|
|
439
549
|
it "warns of Non-ISO reference in Normative References" do
|
440
550
|
FileUtils.rm_f "test.err"
|
441
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
551
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
442
552
|
#{VALIDATING_BLANK_HDR}
|
443
553
|
|
444
554
|
[bibliography]
|
@@ -450,7 +560,7 @@ end
|
|
450
560
|
|
451
561
|
it "warns that Scope contains subclauses" do
|
452
562
|
FileUtils.rm_f "test.err"
|
453
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
563
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
454
564
|
#{VALIDATING_BLANK_HDR}
|
455
565
|
|
456
566
|
== Scope
|
@@ -463,7 +573,7 @@ end
|
|
463
573
|
|
464
574
|
it "warns that Table should have title" do
|
465
575
|
FileUtils.rm_f "test.err"
|
466
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
576
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
467
577
|
#{VALIDATING_BLANK_HDR}
|
468
578
|
|
469
579
|
|===
|
@@ -475,7 +585,7 @@ end
|
|
475
585
|
|
476
586
|
it "gives Style warning if number not broken up in threes" do
|
477
587
|
FileUtils.rm_f "test.err"
|
478
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
588
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
479
589
|
#{VALIDATING_BLANK_HDR}
|
480
590
|
|
481
591
|
== Clause
|
@@ -486,7 +596,7 @@ end
|
|
486
596
|
|
487
597
|
it "gives No style warning if number not broken up in threes is ISO reference" do
|
488
598
|
FileUtils.rm_f "test.err"
|
489
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
599
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
490
600
|
#{VALIDATING_BLANK_HDR}
|
491
601
|
|
492
602
|
== Clause
|
@@ -497,7 +607,7 @@ end
|
|
497
607
|
|
498
608
|
it "Style warning if decimal point" do
|
499
609
|
FileUtils.rm_f "test.err"
|
500
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
610
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
501
611
|
#{VALIDATING_BLANK_HDR}
|
502
612
|
|
503
613
|
== Clause
|
@@ -508,7 +618,7 @@ end
|
|
508
618
|
|
509
619
|
it "Style warning if billion used" do
|
510
620
|
FileUtils.rm_f "test.err"
|
511
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
621
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
512
622
|
#{VALIDATING_BLANK_HDR}
|
513
623
|
|
514
624
|
== Clause
|
@@ -519,7 +629,7 @@ end
|
|
519
629
|
|
520
630
|
it "Style warning if no space before percent sign" do
|
521
631
|
FileUtils.rm_f "test.err"
|
522
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
632
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
523
633
|
#{VALIDATING_BLANK_HDR}
|
524
634
|
|
525
635
|
== Clause
|
@@ -530,7 +640,7 @@ end
|
|
530
640
|
|
531
641
|
it "Style warning if unbracketed tolerance before percent sign" do
|
532
642
|
FileUtils.rm_f "test.err"
|
533
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
643
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
534
644
|
#{VALIDATING_BLANK_HDR}
|
535
645
|
|
536
646
|
== Clause
|
@@ -541,7 +651,7 @@ end
|
|
541
651
|
|
542
652
|
it "Style warning if dots in abbreviation" do
|
543
653
|
FileUtils.rm_f "test.err"
|
544
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
654
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
545
655
|
#{VALIDATING_BLANK_HDR}
|
546
656
|
|
547
657
|
== Clause
|
@@ -552,7 +662,7 @@ end
|
|
552
662
|
|
553
663
|
it "No Style warning if dots in abbreviation are e.g." do
|
554
664
|
FileUtils.rm_f "test.err"
|
555
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
665
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
556
666
|
#{VALIDATING_BLANK_HDR}
|
557
667
|
|
558
668
|
== Clause
|
@@ -563,7 +673,7 @@ end
|
|
563
673
|
|
564
674
|
it "Style warning if ppm used" do
|
565
675
|
FileUtils.rm_f "test.err"
|
566
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
676
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
567
677
|
#{VALIDATING_BLANK_HDR}
|
568
678
|
|
569
679
|
== Clause
|
@@ -574,7 +684,7 @@ end
|
|
574
684
|
|
575
685
|
it "Style warning if space between number and degree" do
|
576
686
|
FileUtils.rm_f "test.err"
|
577
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
687
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
578
688
|
#{VALIDATING_BLANK_HDR}
|
579
689
|
|
580
690
|
== Clause
|
@@ -585,7 +695,7 @@ end
|
|
585
695
|
|
586
696
|
it "Style warning if no space between number and SI unit" do
|
587
697
|
FileUtils.rm_f "test.err"
|
588
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
698
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
589
699
|
#{VALIDATING_BLANK_HDR}
|
590
700
|
|
591
701
|
== Clause
|
@@ -596,7 +706,7 @@ end
|
|
596
706
|
|
597
707
|
it "Style warning if mins used" do
|
598
708
|
FileUtils.rm_f "test.err"
|
599
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
709
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
600
710
|
#{VALIDATING_BLANK_HDR}
|
601
711
|
|
602
712
|
== Clause
|
@@ -607,7 +717,7 @@ end
|
|
607
717
|
|
608
718
|
# can't test: our asciidoc template won't allow this to be generated
|
609
719
|
# it "Style warning if foreword contains subclauses" do
|
610
|
-
# expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-standard unit}).to_stderr
|
720
|
+
# expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true) }.to output(%r{non-standard unit}).to_stderr
|
611
721
|
# #{VALIDATING_BLANK_HDR}
|
612
722
|
#
|
613
723
|
# INPUT
|
@@ -615,7 +725,7 @@ end
|
|
615
725
|
|
616
726
|
# can't test: we strip out any such content from Normative references preemptively
|
617
727
|
#it "Style warning if Normative References contains subclauses" do
|
618
|
-
#expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{normative references contains subclauses}).to_stderr
|
728
|
+
#expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true) }.to output(%r{normative references contains subclauses}).to_stderr
|
619
729
|
##{VALIDATING_BLANK_HDR}
|
620
730
|
#
|
621
731
|
#[bibliography]
|
@@ -627,7 +737,7 @@ end
|
|
627
737
|
|
628
738
|
it "Style warning if two Symbols and Abbreviated Terms sections" do
|
629
739
|
FileUtils.rm_f "test.err"
|
630
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
740
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
631
741
|
#{VALIDATING_BLANK_HDR}
|
632
742
|
|
633
743
|
== Terms and Abbreviations
|
@@ -641,7 +751,7 @@ end
|
|
641
751
|
|
642
752
|
it "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
|
643
753
|
FileUtils.rm_f "test.err"
|
644
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
754
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
645
755
|
#{VALIDATING_BLANK_HDR}
|
646
756
|
|
647
757
|
== Symbols and Abbreviated Terms
|
@@ -653,7 +763,7 @@ end
|
|
653
763
|
|
654
764
|
it "Warning if missing foreword" do
|
655
765
|
FileUtils.rm_f "test.err"
|
656
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
766
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
657
767
|
#{VALIDATING_BLANK_HDR}
|
658
768
|
|
659
769
|
== Symbols and Abbreviated Terms
|
@@ -661,11 +771,27 @@ it "Warning if missing foreword" do
|
|
661
771
|
Paragraph
|
662
772
|
INPUT
|
663
773
|
expect(File.read("test.err")).to include "Initial section must be (content) Foreword"
|
774
|
+
|
775
|
+
FileUtils.rm_f "test.err"
|
776
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
777
|
+
= Document title
|
778
|
+
Author
|
779
|
+
:docfile: test.adoc
|
780
|
+
:nodoc:
|
781
|
+
:no-isobib:
|
782
|
+
:doctype: amendment
|
783
|
+
|
784
|
+
== Symbols and Abbreviated Terms
|
785
|
+
|
786
|
+
Paragraph
|
787
|
+
INPUT
|
788
|
+
expect(File.read("test.err")).not_to include "Initial section must be (content) Foreword"
|
789
|
+
|
664
790
|
end
|
665
791
|
|
666
792
|
it "Warning if do not start with scope or introduction" do
|
667
793
|
FileUtils.rm_f "test.err"
|
668
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
794
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
669
795
|
#{VALIDATING_BLANK_HDR}
|
670
796
|
Foreword
|
671
797
|
|
@@ -674,11 +800,29 @@ it "Warning if do not start with scope or introduction" do
|
|
674
800
|
Paragraph
|
675
801
|
INPUT
|
676
802
|
expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
|
803
|
+
|
804
|
+
FileUtils.rm_f "test.err"
|
805
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
806
|
+
= Document title
|
807
|
+
Author
|
808
|
+
:docfile: test.adoc
|
809
|
+
:nodoc:
|
810
|
+
:no-isobib:
|
811
|
+
:doctype: amendment
|
812
|
+
|
813
|
+
Foreword
|
814
|
+
|
815
|
+
== Symbols and Abbreviated Terms
|
816
|
+
|
817
|
+
Paragraph
|
818
|
+
INPUT
|
819
|
+
expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
|
820
|
+
|
677
821
|
end
|
678
822
|
|
679
823
|
it "Warning if introduction not followed by scope" do
|
680
824
|
FileUtils.rm_f "test.err"
|
681
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
825
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
682
826
|
#{VALIDATING_BLANK_HDR}
|
683
827
|
|
684
828
|
.Foreword
|
@@ -691,11 +835,32 @@ it "Warning if introduction not followed by scope" do
|
|
691
835
|
Paragraph
|
692
836
|
INPUT
|
693
837
|
expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
|
838
|
+
|
839
|
+
FileUtils.rm_f "test.err"
|
840
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
841
|
+
= Document title
|
842
|
+
Author
|
843
|
+
:docfile: test.adoc
|
844
|
+
:nodoc:
|
845
|
+
:no-isobib:
|
846
|
+
:doctype: amendment
|
847
|
+
|
848
|
+
.Foreword
|
849
|
+
Foreword
|
850
|
+
|
851
|
+
== Introduction
|
852
|
+
|
853
|
+
== Symbols and Abbreviated Terms
|
854
|
+
|
855
|
+
Paragraph
|
856
|
+
INPUT
|
857
|
+
expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
|
858
|
+
|
694
859
|
end
|
695
860
|
|
696
861
|
it "Warning if normative references not followed by terms and definitions" do
|
697
862
|
FileUtils.rm_f "test.err"
|
698
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
863
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
699
864
|
#{VALIDATING_BLANK_HDR}
|
700
865
|
|
701
866
|
.Foreword
|
@@ -711,11 +876,35 @@ it "Warning if normative references not followed by terms and definitions" do
|
|
711
876
|
Paragraph
|
712
877
|
INPUT
|
713
878
|
expect(File.read("test.err")).to include "Normative References must be followed by Terms and Definitions"
|
879
|
+
|
880
|
+
FileUtils.rm_f "test.err"
|
881
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
882
|
+
= Document title
|
883
|
+
Author
|
884
|
+
:docfile: test.adoc
|
885
|
+
:nodoc:
|
886
|
+
:no-isobib:
|
887
|
+
:doctype: amendment
|
888
|
+
|
889
|
+
.Foreword
|
890
|
+
Foreword
|
891
|
+
|
892
|
+
== Scope
|
893
|
+
|
894
|
+
[bibliography]
|
895
|
+
== Normative References
|
896
|
+
|
897
|
+
== Symbols and Abbreviated Terms
|
898
|
+
|
899
|
+
Paragraph
|
900
|
+
INPUT
|
901
|
+
expect(File.read("test.err")).not_to include "Normative References must be followed by Terms and Definitions"
|
902
|
+
|
714
903
|
end
|
715
904
|
|
716
905
|
it "Warning if there are no clauses in the document" do
|
717
906
|
FileUtils.rm_f "test.err"
|
718
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
907
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
719
908
|
#{VALIDATING_BLANK_HDR}
|
720
909
|
|
721
910
|
.Foreword
|
@@ -732,11 +921,35 @@ it "Warning if there are no clauses in the document" do
|
|
732
921
|
|
733
922
|
INPUT
|
734
923
|
expect(File.read("test.err")).to include "Document must contain at least one clause"
|
924
|
+
|
925
|
+
FileUtils.rm_f "test.err"
|
926
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
927
|
+
= Document title
|
928
|
+
Author
|
929
|
+
:docfile: test.adoc
|
930
|
+
:nodoc:
|
931
|
+
:no-isobib:
|
932
|
+
:doctype: amendment
|
933
|
+
|
934
|
+
.Foreword
|
935
|
+
Foreword
|
936
|
+
|
937
|
+
== Scope
|
938
|
+
|
939
|
+
[bibliography]
|
940
|
+
== Normative References
|
941
|
+
|
942
|
+
== Terms and Definitions
|
943
|
+
|
944
|
+
== Symbols and Abbreviated Terms
|
945
|
+
|
946
|
+
INPUT
|
947
|
+
expect(File.read("test.err")).not_to include "Document must contain at least one clause"
|
735
948
|
end
|
736
949
|
|
737
950
|
it "Warning if scope occurs after Terms and Definitions" do
|
738
951
|
FileUtils.rm_f "test.err"
|
739
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
952
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
740
953
|
#{VALIDATING_BLANK_HDR}
|
741
954
|
|
742
955
|
.Foreword
|
@@ -755,11 +968,38 @@ it "Warning if scope occurs after Terms and Definitions" do
|
|
755
968
|
|
756
969
|
INPUT
|
757
970
|
expect(File.read("test.err")).to include "Scope must occur before Terms and Definitions"
|
971
|
+
|
972
|
+
FileUtils.rm_f "test.err"
|
973
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
974
|
+
= Document title
|
975
|
+
Author
|
976
|
+
:docfile: test.adoc
|
977
|
+
:nodoc:
|
978
|
+
:no-isobib:
|
979
|
+
:doctype: amendment
|
980
|
+
|
981
|
+
.Foreword
|
982
|
+
Foreword
|
983
|
+
|
984
|
+
== Scope
|
985
|
+
|
986
|
+
[bibliography]
|
987
|
+
== Normative References
|
988
|
+
|
989
|
+
== Terms and Definitions
|
990
|
+
|
991
|
+
== Clause
|
992
|
+
|
993
|
+
== Scope
|
994
|
+
|
995
|
+
INPUT
|
996
|
+
expect(File.read("test.err")).not_to include "Scope must occur before Terms and Definitions"
|
997
|
+
|
758
998
|
end
|
759
999
|
|
760
1000
|
it "Warning if Symbols and Abbreviated Terms does not occur immediately after Terms and Definitions" do
|
761
1001
|
FileUtils.rm_f "test.err"
|
762
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1002
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
763
1003
|
#{VALIDATING_BLANK_HDR}
|
764
1004
|
|
765
1005
|
.Foreword
|
@@ -778,11 +1018,39 @@ it "Warning if Symbols and Abbreviated Terms does not occur immediately after Te
|
|
778
1018
|
|
779
1019
|
INPUT
|
780
1020
|
expect(File.read("test.err")).to include "Only annexes and references can follow clauses"
|
1021
|
+
|
1022
|
+
FileUtils.rm_f "test.err"
|
1023
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1024
|
+
= Document title
|
1025
|
+
Author
|
1026
|
+
:docfile: test.adoc
|
1027
|
+
:nodoc:
|
1028
|
+
:no-isobib:
|
1029
|
+
:doctype: amendment
|
1030
|
+
|
1031
|
+
|
1032
|
+
.Foreword
|
1033
|
+
Foreword
|
1034
|
+
|
1035
|
+
== Scope
|
1036
|
+
|
1037
|
+
[bibliography]
|
1038
|
+
== Normative References
|
1039
|
+
|
1040
|
+
== Terms and Definitions
|
1041
|
+
|
1042
|
+
== Clause
|
1043
|
+
|
1044
|
+
== Symbols and Abbreviated Terms
|
1045
|
+
|
1046
|
+
INPUT
|
1047
|
+
expect(File.read("test.err")).not_to include "Only annexes and references can follow clauses"
|
1048
|
+
|
781
1049
|
end
|
782
1050
|
|
783
1051
|
it "Warning if no normative references" do
|
784
1052
|
FileUtils.rm_f "test.err"
|
785
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1053
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
786
1054
|
#{VALIDATING_BLANK_HDR}
|
787
1055
|
|
788
1056
|
.Foreword
|
@@ -805,11 +1073,42 @@ it "Warning if no normative references" do
|
|
805
1073
|
|
806
1074
|
INPUT
|
807
1075
|
expect(File.read("test.err")).to include "Document must include (references) Normative References"
|
1076
|
+
|
1077
|
+
FileUtils.rm_f "test.err"
|
1078
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1079
|
+
= Document title
|
1080
|
+
Author
|
1081
|
+
:docfile: test.adoc
|
1082
|
+
:nodoc:
|
1083
|
+
:no-isobib:
|
1084
|
+
:doctype: amendment
|
1085
|
+
|
1086
|
+
.Foreword
|
1087
|
+
Foreword
|
1088
|
+
|
1089
|
+
== Scope
|
1090
|
+
|
1091
|
+
== Terms and Definitions
|
1092
|
+
|
1093
|
+
== Clause
|
1094
|
+
|
1095
|
+
[appendix]
|
1096
|
+
== Appendix A
|
1097
|
+
|
1098
|
+
[appendix]
|
1099
|
+
== Appendix B
|
1100
|
+
|
1101
|
+
[appendix]
|
1102
|
+
== Appendix C
|
1103
|
+
|
1104
|
+
INPUT
|
1105
|
+
expect(File.read("test.err")).not_to include "Document must include (references) Normative References"
|
1106
|
+
|
808
1107
|
end
|
809
1108
|
|
810
1109
|
it "Warning if final section is not named Bibliography" do
|
811
1110
|
FileUtils.rm_f "test.err"
|
812
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1111
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
813
1112
|
#{VALIDATING_BLANK_HDR}
|
814
1113
|
|
815
1114
|
.Foreword
|
@@ -838,11 +1137,48 @@ it "Warning if final section is not named Bibliography" do
|
|
838
1137
|
|
839
1138
|
INPUT
|
840
1139
|
expect(File.read("test.err")).to include "There are sections after the final Bibliography"
|
1140
|
+
|
1141
|
+
FileUtils.rm_f "test.err"
|
1142
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1143
|
+
= Document title
|
1144
|
+
Author
|
1145
|
+
:docfile: test.adoc
|
1146
|
+
:nodoc:
|
1147
|
+
:no-isobib:
|
1148
|
+
:doctype: amendment
|
1149
|
+
|
1150
|
+
.Foreword
|
1151
|
+
Foreword
|
1152
|
+
|
1153
|
+
== Scope
|
1154
|
+
|
1155
|
+
[bibliography]
|
1156
|
+
== Normative References
|
1157
|
+
|
1158
|
+
== Terms and Definitions
|
1159
|
+
|
1160
|
+
== Clause
|
1161
|
+
|
1162
|
+
[appendix]
|
1163
|
+
== Appendix A
|
1164
|
+
|
1165
|
+
[appendix]
|
1166
|
+
== Appendix B
|
1167
|
+
|
1168
|
+
[bibliography]
|
1169
|
+
== Bibliography
|
1170
|
+
|
1171
|
+
[bibliography]
|
1172
|
+
== Appendix C
|
1173
|
+
|
1174
|
+
INPUT
|
1175
|
+
expect(File.read("test.err")).not_to include "There are sections after the final Bibliography"
|
1176
|
+
|
841
1177
|
end
|
842
1178
|
|
843
1179
|
it "Warning if final section is not styled Bibliography" do
|
844
1180
|
FileUtils.rm_f "test.err"
|
845
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1181
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
846
1182
|
#{VALIDATING_BLANK_HDR}
|
847
1183
|
|
848
1184
|
.Foreword
|
@@ -867,11 +1203,45 @@ it "Warning if final section is not styled Bibliography" do
|
|
867
1203
|
|
868
1204
|
INPUT
|
869
1205
|
expect(File.read("test.err")).to include "Section not marked up as [bibliography]"
|
1206
|
+
|
1207
|
+
|
1208
|
+
FileUtils.rm_f "test.err"
|
1209
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1210
|
+
= Document title
|
1211
|
+
Author
|
1212
|
+
:docfile: test.adoc
|
1213
|
+
:nodoc:
|
1214
|
+
:no-isobib:
|
1215
|
+
:doctype: amendment
|
1216
|
+
|
1217
|
+
.Foreword
|
1218
|
+
Foreword
|
1219
|
+
|
1220
|
+
== Scope
|
1221
|
+
|
1222
|
+
[bibliography]
|
1223
|
+
== Normative References
|
1224
|
+
|
1225
|
+
== Terms and Definitions
|
1226
|
+
|
1227
|
+
== Clause
|
1228
|
+
|
1229
|
+
[appendix]
|
1230
|
+
== Appendix A
|
1231
|
+
|
1232
|
+
[appendix]
|
1233
|
+
== Appendix B
|
1234
|
+
|
1235
|
+
== Bibliography
|
1236
|
+
|
1237
|
+
INPUT
|
1238
|
+
expect(File.read("test.err")).not_to include "Section not marked up as [bibliography]"
|
1239
|
+
|
870
1240
|
end
|
871
1241
|
|
872
1242
|
it "Warning if English title intro and no French title intro" do
|
873
1243
|
FileUtils.rm_f "test.err"
|
874
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1244
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
875
1245
|
= Document title
|
876
1246
|
Author
|
877
1247
|
:docfile: test.adoc
|
@@ -885,7 +1255,7 @@ end
|
|
885
1255
|
|
886
1256
|
it "Warning if French title intro and no English title intro" do
|
887
1257
|
FileUtils.rm_f "test.err"
|
888
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1258
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
889
1259
|
= Document title
|
890
1260
|
Author
|
891
1261
|
:docfile: test.adoc
|
@@ -900,7 +1270,7 @@ end
|
|
900
1270
|
|
901
1271
|
it "Warning if English title and no French intro" do
|
902
1272
|
FileUtils.rm_f "test.err"
|
903
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1273
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
904
1274
|
= Document title
|
905
1275
|
Author
|
906
1276
|
:docfile: test.adoc
|
@@ -914,7 +1284,7 @@ end
|
|
914
1284
|
|
915
1285
|
it "Warning if French title and no English title" do
|
916
1286
|
FileUtils.rm_f "test.err"
|
917
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1287
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
918
1288
|
= Document title
|
919
1289
|
Author
|
920
1290
|
:docfile: test.adoc
|
@@ -928,7 +1298,7 @@ end
|
|
928
1298
|
|
929
1299
|
it "Warning if English title part and no French title part" do
|
930
1300
|
FileUtils.rm_f "test.err"
|
931
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1301
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
932
1302
|
= Document title
|
933
1303
|
Author
|
934
1304
|
:docfile: test.adoc
|
@@ -942,7 +1312,7 @@ end
|
|
942
1312
|
|
943
1313
|
it "Warning if French title part and no English title part" do
|
944
1314
|
FileUtils.rm_f "test.err"
|
945
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1315
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
946
1316
|
= Document title
|
947
1317
|
Author
|
948
1318
|
:docfile: test.adoc
|
@@ -956,7 +1326,7 @@ end
|
|
956
1326
|
|
957
1327
|
it "Warning if non-IEC document with subpart" do
|
958
1328
|
FileUtils.rm_f "test.err"
|
959
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1329
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
960
1330
|
= Document title
|
961
1331
|
Author
|
962
1332
|
:docfile: test.adoc
|
@@ -972,14 +1342,14 @@ end
|
|
972
1342
|
|
973
1343
|
it "No warning if joint IEC/non-IEC document with subpart" do
|
974
1344
|
FileUtils.rm_f "test.err"
|
975
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1345
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
976
1346
|
= Document title
|
977
1347
|
Author
|
978
1348
|
:docfile: test.adoc
|
979
1349
|
:nodoc:
|
980
1350
|
:docnumber: 10
|
981
1351
|
:partnumber: 1-1
|
982
|
-
:publisher: ISO
|
1352
|
+
:publisher: ISO;IEC
|
983
1353
|
:no-isobib:
|
984
1354
|
|
985
1355
|
INPUT
|
@@ -988,7 +1358,7 @@ end
|
|
988
1358
|
|
989
1359
|
it "Warning if main title contains document type" do
|
990
1360
|
FileUtils.rm_f "test.err"
|
991
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1361
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
992
1362
|
= Document title
|
993
1363
|
Author
|
994
1364
|
:docfile: test.adoc
|
@@ -1002,7 +1372,7 @@ end
|
|
1002
1372
|
|
1003
1373
|
it "Warning if intro title contains document type" do
|
1004
1374
|
FileUtils.rm_f "test.err"
|
1005
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1375
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1006
1376
|
= Document title
|
1007
1377
|
Author
|
1008
1378
|
:docfile: test.adoc
|
@@ -1016,7 +1386,7 @@ end
|
|
1016
1386
|
|
1017
1387
|
it "Each first-level subclause must have a title" do
|
1018
1388
|
FileUtils.rm_f "test.err"
|
1019
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1389
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1020
1390
|
#{VALIDATING_BLANK_HDR}
|
1021
1391
|
== Clause
|
1022
1392
|
|
@@ -1027,7 +1397,7 @@ end
|
|
1027
1397
|
|
1028
1398
|
it "All subclauses must have a title, or none" do
|
1029
1399
|
FileUtils.rm_f "test.err"
|
1030
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1400
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1031
1401
|
#{VALIDATING_BLANK_HDR}
|
1032
1402
|
== Clause
|
1033
1403
|
|
@@ -1042,7 +1412,7 @@ end
|
|
1042
1412
|
|
1043
1413
|
it "Warning if subclause is only child of its parent, or none" do
|
1044
1414
|
FileUtils.rm_f "test.err"
|
1045
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1415
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1046
1416
|
#{VALIDATING_BLANK_HDR}
|
1047
1417
|
== Clause
|
1048
1418
|
|
@@ -1054,7 +1424,7 @@ end
|
|
1054
1424
|
|
1055
1425
|
it "Warning if invalid technical committee type" do
|
1056
1426
|
FileUtils.rm_f "test.err"
|
1057
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1427
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1058
1428
|
= Document title
|
1059
1429
|
Author
|
1060
1430
|
:docfile: test.adoc
|
@@ -1068,7 +1438,7 @@ end
|
|
1068
1438
|
|
1069
1439
|
it "Warning if invalid subcommittee type" do
|
1070
1440
|
FileUtils.rm_f "test.err"
|
1071
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1441
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1072
1442
|
= Document title
|
1073
1443
|
Author
|
1074
1444
|
:docfile: test.adoc
|
@@ -1082,7 +1452,7 @@ end
|
|
1082
1452
|
|
1083
1453
|
it "Warning if invalid subcommittee type" do
|
1084
1454
|
FileUtils.rm_f "test.err"
|
1085
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1455
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1086
1456
|
= Document title
|
1087
1457
|
Author
|
1088
1458
|
:docfile: test.adoc
|
@@ -1096,7 +1466,7 @@ end
|
|
1096
1466
|
|
1097
1467
|
it "Warning if 'see' crossreference points to normative section" do
|
1098
1468
|
FileUtils.rm_f "test.err"
|
1099
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1469
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1100
1470
|
#{VALIDATING_BLANK_HDR}
|
1101
1471
|
[[terms]]
|
1102
1472
|
== Terms and Definitions
|
@@ -1109,7 +1479,7 @@ end
|
|
1109
1479
|
|
1110
1480
|
it "Warning if 'see' reference points to normative reference" do
|
1111
1481
|
FileUtils.rm_f "test.err"
|
1112
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1482
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1113
1483
|
#{VALIDATING_BLANK_HDR}
|
1114
1484
|
[bibliography]
|
1115
1485
|
== Normative References
|
@@ -1123,7 +1493,7 @@ end
|
|
1123
1493
|
|
1124
1494
|
it "Warning if term definition starts with article" do
|
1125
1495
|
FileUtils.rm_f "test.err"
|
1126
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1496
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1127
1497
|
#{VALIDATING_BLANK_HDR}
|
1128
1498
|
== Terms and Definitions
|
1129
1499
|
|
@@ -1136,7 +1506,7 @@ end
|
|
1136
1506
|
|
1137
1507
|
it "Warning if term definition ends with period" do
|
1138
1508
|
FileUtils.rm_f "test.err"
|
1139
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1509
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1140
1510
|
#{VALIDATING_BLANK_HDR}
|
1141
1511
|
== Terms and Definitions
|
1142
1512
|
|
@@ -1149,7 +1519,7 @@ end
|
|
1149
1519
|
|
1150
1520
|
it "validates document against ISO XML schema" do
|
1151
1521
|
FileUtils.rm_f "test.err"
|
1152
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1522
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1153
1523
|
#{VALIDATING_BLANK_HDR}
|
1154
1524
|
|
1155
1525
|
[align=mid-air]
|
@@ -1160,7 +1530,7 @@ end
|
|
1160
1530
|
|
1161
1531
|
it "Warn if more than 7 levels of subclause" do
|
1162
1532
|
FileUtils.rm_f "test.err"
|
1163
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1533
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1164
1534
|
= Document title
|
1165
1535
|
Author
|
1166
1536
|
:docfile: test.adoc
|
@@ -1193,7 +1563,7 @@ end
|
|
1193
1563
|
|
1194
1564
|
it "Do not warn if not more than 7 levels of subclause" do
|
1195
1565
|
FileUtils.rm_f "test.err"
|
1196
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1566
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1197
1567
|
= Document title
|
1198
1568
|
Author
|
1199
1569
|
:docfile: test.adoc
|
@@ -1223,7 +1593,7 @@ end
|
|
1223
1593
|
|
1224
1594
|
it "Warn if term citation in Terms & Definitions not preceded with italicised term" do
|
1225
1595
|
FileUtils.rm_f "test.err"
|
1226
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1596
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1227
1597
|
#{VALIDATING_BLANK_HDR}
|
1228
1598
|
== Terms and Definitions
|
1229
1599
|
|
@@ -1237,7 +1607,7 @@ end
|
|
1237
1607
|
|
1238
1608
|
it "Warn if an undated reference has no associated footnote" do
|
1239
1609
|
FileUtils.rm_f "test.err"
|
1240
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1610
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
|
1241
1611
|
#{VALIDATING_BLANK_HDR}
|
1242
1612
|
|
1243
1613
|
[bibliography]
|