metanorma-iso 1.5.12 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +18 -1
  3. data/lib/asciidoctor/iso/base.rb +5 -5
  4. data/lib/asciidoctor/iso/basicdoc.rng +52 -3
  5. data/lib/asciidoctor/iso/cleanup.rb +0 -6
  6. data/lib/asciidoctor/iso/front.rb +10 -5
  7. data/lib/asciidoctor/iso/isodoc.rng +51 -3
  8. data/lib/asciidoctor/iso/isostandard-amd.rng +8 -4
  9. data/lib/asciidoctor/iso/isostandard.rng +27 -10
  10. data/lib/asciidoctor/iso/validate.rb +78 -0
  11. data/lib/asciidoctor/iso/validate_section.rb +12 -9
  12. data/lib/isodoc/iso/base_convert.rb +2 -1
  13. data/lib/isodoc/iso/html/header.html +12 -12
  14. data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
  15. data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
  16. data/lib/isodoc/iso/html/htmlstyle.css +1 -1
  17. data/lib/isodoc/iso/html/htmlstyle.scss +1 -1
  18. data/lib/isodoc/iso/html/isodoc.css +42 -42
  19. data/lib/isodoc/iso/html/isodoc.scss +42 -42
  20. data/lib/isodoc/iso/html/style-human.css +9 -9
  21. data/lib/isodoc/iso/html/style-human.scss +7 -7
  22. data/lib/isodoc/iso/html/style-iso.css +7 -7
  23. data/lib/isodoc/iso/html/style-iso.scss +5 -5
  24. data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
  25. data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
  26. data/lib/isodoc/iso/html/wordstyle.css +67 -67
  27. data/lib/isodoc/iso/html/wordstyle.scss +67 -67
  28. data/lib/isodoc/iso/html_convert.rb +6 -2
  29. data/lib/isodoc/iso/i18n-en.yaml +2 -0
  30. data/lib/isodoc/iso/i18n-fr.yaml +1 -1
  31. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -1
  32. data/lib/isodoc/iso/iso.amendment.xsl +276 -59
  33. data/lib/isodoc/iso/iso.international-standard.xsl +276 -59
  34. data/lib/isodoc/iso/metadata.rb +1 -0
  35. data/lib/isodoc/iso/sections.rb +1 -1
  36. data/lib/isodoc/iso/word_convert.rb +6 -2
  37. data/lib/isodoc/iso/xref.rb +34 -8
  38. data/lib/metanorma/iso/processor.rb +11 -9
  39. data/lib/metanorma/iso/version.rb +1 -1
  40. data/metanorma-iso.gemspec +2 -2
  41. data/spec/asciidoctor-iso/amd_spec.rb +14 -14
  42. data/spec/asciidoctor-iso/base_spec.rb +22 -20
  43. data/spec/asciidoctor-iso/blocks_spec.rb +22 -22
  44. data/spec/asciidoctor-iso/cleanup_spec.rb +32 -26
  45. data/spec/asciidoctor-iso/inline_spec.rb +7 -7
  46. data/spec/asciidoctor-iso/lists_spec.rb +9 -9
  47. data/spec/asciidoctor-iso/refs_spec.rb +5 -5
  48. data/spec/asciidoctor-iso/section_spec.rb +12 -7
  49. data/spec/asciidoctor-iso/table_spec.rb +4 -4
  50. data/spec/asciidoctor-iso/validate_spec.rb +455 -87
  51. data/spec/isodoc/amd_spec.rb +13 -13
  52. data/spec/isodoc/iso_spec.rb +2 -2
  53. data/spec/isodoc/metadata_spec.rb +2 -0
  54. data/spec/isodoc/section_spec.rb +20 -0
  55. data/spec/isodoc/xref_spec.rb +12 -0
  56. metadata +6 -12
  57. data/.github/workflows/macos.yml +0 -49
  58. data/.github/workflows/ubuntu.yml +0 -53
  59. data/.github/workflows/windows.yml +0 -50
  60. data/lib/asciidoctor/iso/macros.rb +0 -21
  61. data/lib/asciidoctor/iso/term_lookup_cleanup.rb +0 -86
  62. 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 "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
@@ -28,7 +28,7 @@ RSpec.describe Asciidoctor::ISO do
28
28
  </li>
29
29
  <li>
30
30
  <p id="_">List 3</p>
31
- <ol id="_" type="arabic">
31
+ <ol id="_">
32
32
  <li>
33
33
  <p id="_">List A</p>
34
34
  </li>
@@ -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
@@ -107,13 +107,13 @@ RSpec.describe Asciidoctor::ISO do
107
107
  <li><p id="_">Second</p><p id="_">entry1</p>
108
108
  <p id="_">entry2</p></li>
109
109
  </ul>
110
- <ol id="id1" type="alphabet">
110
+ <ol id="id1">
111
111
  <li>
112
112
  <p id="_">First</p>
113
113
  </li>
114
114
  <li>
115
115
  <p id="_">Second</p>
116
- <ol id="_" type="alphabet_upper">
116
+ <ol id="_">
117
117
  <li>
118
118
  <p id="_">Third</p>
119
119
  </li>
@@ -129,19 +129,19 @@ RSpec.describe Asciidoctor::ISO do
129
129
  <p id="_">Sixth</p>
130
130
  </li>
131
131
  </ol>
132
- <ol id="_" type="roman">
132
+ <ol id="_">
133
133
  <li>
134
134
  <p id="_">A</p>
135
135
  </li>
136
136
  <li>
137
137
  <p id="_">B</p>
138
- <ol id="_" type="roman_upper">
138
+ <ol id="_">
139
139
  <li>
140
140
  <p id="_">C</p>
141
141
  </li>
142
142
  <li>
143
143
  <p id="_">D</p>
144
- <ol id="_" type="arabic">
144
+ <ol id="_">
145
145
  <li>
146
146
  <p id="_">E</p>
147
147
  </li>
@@ -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>>
@@ -68,7 +68,7 @@ RSpec.describe Asciidoctor::ISO do
68
68
  <note format='text/plain' type='Unpublished-Status'>The standard is in press</note>
69
69
  </bibitem>
70
70
  <bibitem id='fdis' type='standard'>
71
- <fetched>2020-11-09</fetched>
71
+ <fetched>#{Date.today}</fetched>
72
72
  <title type='title-intro' format='text/plain' language='fr' script='Latn'>Traitement de produits de soins de santé</title>
73
73
  <title type='title-main' format='text/plain' language='fr' script='Latn'>
74
74
  Informations relatives au traitement des dispositifs médicaux à
@@ -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
 
@@ -50,6 +50,8 @@ RSpec.describe Asciidoctor::ISO do
50
50
  [%appendix]
51
51
  === Appendix 1
52
52
 
53
+ ==== Appendix subclause
54
+
53
55
  == Bibliography
54
56
 
55
57
  === Bibliography Subsection
@@ -136,6 +138,9 @@ standardization at the following addresses:</p>
136
138
  </clause>
137
139
  <appendix id="_" inline-header="false" obligation="normative">
138
140
  <title>Appendix 1</title>
141
+ <clause id='_' inline-header='false' obligation='normative'>
142
+ <title>Appendix subclause</title>
143
+ </clause>
139
144
  </appendix></annex><bibliography><references id="_" obligation="informative" normative="true">
140
145
  <title>Normative references</title>
141
146
  <p id="_">There are no normative references in this document.</p>
@@ -151,7 +156,7 @@ standardization at the following addresses:</p>
151
156
  end
152
157
 
153
158
  it "processes section obligations" do
154
- 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")
155
160
  #{ASCIIDOC_BLANK_HDR}
156
161
  [obligation=informative]
157
162
  == Clause 1
@@ -182,7 +187,7 @@ standardization at the following addresses:</p>
182
187
  end
183
188
 
184
189
  it "processes inline headers" do
185
- 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")
186
191
  #{ASCIIDOC_BLANK_HDR}
187
192
  == Clause 1
188
193
 
@@ -213,7 +218,7 @@ standardization at the following addresses:</p>
213
218
  end
214
219
 
215
220
  it "processes blank headers" do
216
- 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")
217
222
  #{ASCIIDOC_BLANK_HDR}
218
223
  == Clause 1
219
224
 
@@ -233,7 +238,7 @@ standardization at the following addresses:</p>
233
238
  end
234
239
 
235
240
  it "processes terms & definitions with external source" do
236
- 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")
237
242
  #{ASCIIDOC_BLANK_HDR}
238
243
 
239
244
  Foreword
@@ -272,7 +277,7 @@ standardization at the following addresses:</p>
272
277
  end
273
278
 
274
279
  it "processes empty terms & definitions" do
275
- 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")
276
281
  #{ASCIIDOC_BLANK_HDR}
277
282
 
278
283
  Foreword
@@ -318,7 +323,7 @@ standardization at the following addresses:</p>
318
323
  end
319
324
 
320
325
  it "processes empty terms & definitions with external source" do
321
- 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")
322
327
  #{ASCIIDOC_BLANK_HDR}
323
328
 
324
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
@@ -17,15 +17,84 @@ RSpec.describe Asciidoctor::ISO do
17
17
  expect do
18
18
  Metanorma::Compile
19
19
  .new
20
- .compile("spec/assets/xref_error.adoc", type: "iso")
20
+ .compile("spec/assets/xref_error.adoc", type: "iso", :"agree-to-terms" => true)
21
21
  end.to(change { File.exist?("spec/assets/xref_error.err") }
22
22
  .from(false).to(true))
23
23
  end
24
24
  end
25
25
 
26
+ it "Warns of image names not compliant with DRG" do
27
+ FileUtils.rm_f "test.err"
28
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
29
+ = Document title
30
+ Author
31
+ :docfile: test.adoc
32
+ :nodoc:
33
+ :no-isobib:
34
+ :docnumber: 1000
35
+ :partnumber: 1
36
+ :edition: 2
37
+ :amendment-number: 3
38
+
39
+ .Split-it-right sample divider
40
+ image::spec/examples/rice_images/rice_image1.png[]
41
+ image::spec/examples/rice_images/SL1000-1_ed2amd3fig1.png[]
42
+ image::spec/examples/rice_images/1001_ed2amd3fig1.png[]
43
+ image::spec/examples/rice_images/ISO_1213_1.png[]
44
+ image::spec/examples/rice_images/1000-1_ed2amd3figA.png[]
45
+
46
+ |===
47
+ |a |b
48
+
49
+ a|image::spec/examples/rice_images/1000-1_ed2amd3figTab1.png[]
50
+ a|image::spec/examples/rice_images/1000-1_ed2amd3fig2.png[]
51
+ |===
52
+
53
+ image::spec/examples/rice_images/1000-1_ed2amd3figTab2.png[]
54
+
55
+ image::spec/examples/rice_images/1000-1_ed2amd3figA1.png[]
56
+ image::spec/examples/rice_images/1000-1_ed2amd3fig1a.png[]
57
+
58
+ .Stages of gelatinization
59
+ ====
60
+ image::spec/examples/rice_images/1000-1_ed2amd3fig1b.png[]
61
+
62
+ image::spec/examples/rice_images/1000-1_ed2amd3fig4.png[]
63
+ ====
64
+
65
+ image::spec/examples/rice_images/1000-1_ed2amd3fig5_f.png[]
66
+
67
+ [appendix]
68
+ == Annex
69
+ image::spec/examples/rice_images/1000-1_ed2amd3figA2.png[]
70
+ image::spec/examples/rice_images/1000-1_ed2amd3fig3.png[]
71
+
72
+ INPUT
73
+ 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"
74
+ 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"
75
+ 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"
76
+ 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"
77
+ expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3figA.png does not match DRG requirements"
78
+ expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3figTab1.png does not match DRG requirements"
79
+ 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"
80
+ 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"
81
+ 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"
82
+ 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"
83
+ 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"
84
+ 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"
85
+ 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"
86
+ 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"
87
+ 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"
88
+ 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"
89
+ 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"
90
+ 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"
91
+ expect(File.read("test.err")).to include "image name spec/examples/rice_images/1000-1_ed2amd3fig5_f.png expected to have suffix _e"
92
+ expect(File.read("test.err")).not_to include "image name spec/examples/rice_images/1000-1_ed2amd3fig1.png expected to have suffix _e"
93
+ end
94
+
26
95
  it "Warns of missing scope" do
27
96
  FileUtils.rm_f "test.err"
28
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
97
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
29
98
  = Document title
30
99
  Author
31
100
  :docfile: test.adoc
@@ -36,8 +105,9 @@ it "Warns of missing scope" do
36
105
  text
37
106
  INPUT
38
107
  expect(File.read("test.err")).to include "Scope clause missing"
108
+
39
109
  FileUtils.rm_f "test.err"
40
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
110
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
41
111
  = Document title
42
112
  Author
43
113
  :docfile: test.adoc
@@ -49,11 +119,23 @@ it "Warns of missing scope" do
49
119
  INPUT
50
120
  expect(File.read("test.err")).not_to include "Scope clause missing"
51
121
 
122
+ FileUtils.rm_f "test.err"
123
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
124
+ = Document title
125
+ Author
126
+ :docfile: test.adoc
127
+ :nodoc:
128
+ :no-isobib:
129
+ :doctype: amendment
130
+
131
+ text
132
+ INPUT
133
+ expect(File.read("test.err")).not_to include "Scope clause missing"
52
134
  end
53
135
 
54
136
  it "Warns of missing normative references" do
55
137
  FileUtils.rm_f "test.err"
56
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
138
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
57
139
  = Document title
58
140
  Author
59
141
  :docfile: test.adoc
@@ -64,8 +146,9 @@ it "Warns of missing normative references" do
64
146
  text
65
147
  INPUT
66
148
  expect(File.read("test.err")).to include "Normative references missing"
149
+
67
150
  FileUtils.rm_f "test.err"
68
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
151
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
69
152
  = Document title
70
153
  Author
71
154
  :docfile: test.adoc
@@ -78,11 +161,24 @@ it "Warns of missing normative references" do
78
161
  INPUT
79
162
  expect(File.read("test.err")).not_to include "Normative references missing"
80
163
 
164
+ FileUtils.rm_f "test.err"
165
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
166
+ = Document title
167
+ Author
168
+ :docfile: test.adoc
169
+ :nodoc:
170
+ :no-isobib:
171
+ :doctype: amendment
172
+
173
+ text
174
+ INPUT
175
+ expect(File.read("test.err")).not_to include "Normative references missing"
176
+
81
177
  end
82
178
 
83
179
  it "Warns of missing terms & definitions" do
84
180
  FileUtils.rm_f "test.err"
85
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
181
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
86
182
  = Document title
87
183
  Author
88
184
  :docfile: test.adoc
@@ -93,8 +189,9 @@ it "Warns of missing terms & definitions" do
93
189
  text
94
190
  INPUT
95
191
  expect(File.read("test.err")).to include "Terms & definitions missing"
192
+
96
193
  FileUtils.rm_f "test.err"
97
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
194
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
98
195
  = Document title
99
196
  Author
100
197
  :docfile: test.adoc
@@ -107,12 +204,23 @@ it "Warns of missing terms & definitions" do
107
204
  INPUT
108
205
  expect(File.read("test.err")).not_to include "Terms & definitions missing"
109
206
 
110
- end
207
+ FileUtils.rm_f "test.err"
208
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
209
+ = Document title
210
+ Author
211
+ :docfile: test.adoc
212
+ :nodoc:
213
+ :no-isobib:
214
+ :doctype: amendment
111
215
 
216
+ text
217
+ INPUT
218
+ expect(File.read("test.err")).not_to include "Terms & definitions missing"
219
+ end
112
220
 
113
221
  it "Warns of illegal doctype" do
114
222
  FileUtils.rm_f "test.err"
115
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
223
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
116
224
  = Document title
117
225
  Author
118
226
  :docfile: test.adoc
@@ -127,7 +235,7 @@ end
127
235
 
128
236
  it "Warns of illegal script" do
129
237
  FileUtils.rm_f "test.err"
130
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
238
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
131
239
  = Document title
132
240
  Author
133
241
  :docfile: test.adoc
@@ -142,7 +250,7 @@ end
142
250
 
143
251
  it "Warns of illegal stage" do
144
252
  FileUtils.rm_f "test.err"
145
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
253
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
146
254
  = Document title
147
255
  Author
148
256
  :docfile: test.adoc
@@ -157,7 +265,7 @@ end
157
265
 
158
266
  it "Warns of illegal substage" do
159
267
  FileUtils.rm_f "test.err"
160
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
268
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
161
269
  = Document title
162
270
  Author
163
271
  :docfile: test.adoc
@@ -173,7 +281,7 @@ end
173
281
 
174
282
  it "Warns of illegal iteration" do
175
283
  FileUtils.rm_f "test.err"
176
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
284
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
177
285
  = Document title
178
286
  Author
179
287
  :docfile: test.adoc
@@ -189,7 +297,7 @@ end
189
297
 
190
298
  it "Warns of illegal script" do
191
299
  FileUtils.rm_f "test.err"
192
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
300
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
193
301
  = Document title
194
302
  Author
195
303
  :docfile: test.adoc
@@ -204,7 +312,7 @@ end
204
312
 
205
313
  it "warns that technical report may contain requirement" do
206
314
  FileUtils.rm_f "test.err"
207
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
315
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
208
316
  = Document title
209
317
  Author
210
318
  :docfile: test.adoc
@@ -222,7 +330,7 @@ end
222
330
 
223
331
  it "warns that introduction may contain requirement" do
224
332
  FileUtils.rm_f "test.err"
225
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
333
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
226
334
  #{VALIDATING_BLANK_HDR}
227
335
  == Introduction
228
336
 
@@ -233,7 +341,7 @@ end
233
341
 
234
342
  it "warns that foreword may contain recommendation" do
235
343
  FileUtils.rm_f "test.err"
236
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
344
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
237
345
  #{VALIDATING_BLANK_HDR}
238
346
 
239
347
  It is not recommended that widgets should be larger than 15 cm.
@@ -245,7 +353,7 @@ end
245
353
 
246
354
  it "warns that foreword may contain permission" do
247
355
  FileUtils.rm_f "test.err"
248
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
356
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
249
357
  #{VALIDATING_BLANK_HDR}
250
358
 
251
359
  No widget is required to be larger than 15 cm.
@@ -257,7 +365,7 @@ end
257
365
 
258
366
  it "warns that scope may contain recommendation" do
259
367
  FileUtils.rm_f "test.err"
260
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
368
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
261
369
  #{VALIDATING_BLANK_HDR}
262
370
 
263
371
  == Scope
@@ -268,7 +376,7 @@ end
268
376
 
269
377
  it "warns that definition may contain requirement" do
270
378
  FileUtils.rm_f "test.err"
271
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
379
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
272
380
  #{VALIDATING_BLANK_HDR}
273
381
 
274
382
  == Terms and Definitions
@@ -283,7 +391,7 @@ end
283
391
 
284
392
  it "warns that term example may contain recommendation" do
285
393
  FileUtils.rm_f "test.err"
286
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
394
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
287
395
  #{VALIDATING_BLANK_HDR}
288
396
 
289
397
  == Terms and Definitions
@@ -298,7 +406,7 @@ end
298
406
 
299
407
  it "warns that note may contain recommendation" do
300
408
  FileUtils.rm_f "test.err"
301
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
409
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
302
410
  #{VALIDATING_BLANK_HDR}
303
411
 
304
412
  NOTE: It is not recommended that widgets should be larger than 15 cm.
@@ -308,7 +416,7 @@ end
308
416
 
309
417
  it "warns that footnote may contain recommendation" do
310
418
  FileUtils.rm_f "test.err"
311
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
419
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
312
420
  #{VALIDATING_BLANK_HDR}
313
421
 
314
422
  footnote:[It is not recommended that widgets should be larger than 15 cm.]
@@ -318,7 +426,7 @@ end
318
426
 
319
427
  it "warns that term source is not in expected format" do
320
428
  FileUtils.rm_f "test.err"
321
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
429
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
322
430
  #{VALIDATING_BLANK_HDR}
323
431
 
324
432
  [.source]
@@ -329,7 +437,7 @@ end
329
437
 
330
438
  it "warns that figure does not have title" do
331
439
  FileUtils.rm_f "test.err"
332
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
440
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
333
441
  #{VALIDATING_BLANK_HDR}
334
442
 
335
443
  image::spec/examples/rice_images/rice_image1.png[]
@@ -339,7 +447,7 @@ end
339
447
 
340
448
  it "warns that callouts do not match annotations" do
341
449
  FileUtils.rm_f "test.err"
342
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
450
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
343
451
  #{VALIDATING_BLANK_HDR}
344
452
  [source,ruby]
345
453
  --
@@ -356,7 +464,7 @@ end
356
464
 
357
465
  it "warns that term source is not a real reference" do
358
466
  FileUtils.rm_f "test.err"
359
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
467
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
360
468
  #{VALIDATING_BLANK_HDR}
361
469
 
362
470
  [.source]
@@ -367,7 +475,7 @@ end
367
475
 
368
476
  it "warns that undated reference has locality" do
369
477
  FileUtils.rm_f "test.err"
370
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
478
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
371
479
  #{VALIDATING_BLANK_HDR}
372
480
 
373
481
  == Scope
@@ -382,7 +490,7 @@ end
382
490
 
383
491
  it "do not warn that undated reference which is a bibliographic reference has locality" do
384
492
  FileUtils.rm_f "test.err"
385
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
493
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
386
494
  #{VALIDATING_BLANK_HDR}
387
495
 
388
496
  == Scope
@@ -397,7 +505,7 @@ end
397
505
 
398
506
  it "do not warn that undated IEV reference has locality" do
399
507
  FileUtils.rm_f "test.err"
400
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
508
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
401
509
  #{VALIDATING_BLANK_HDR}
402
510
 
403
511
  == Scope
@@ -412,7 +520,7 @@ end
412
520
 
413
521
  it "do not warn that in print has locality" do
414
522
  FileUtils.rm_f "test.err"
415
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
523
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
416
524
  #{VALIDATING_BLANK_HDR}
417
525
 
418
526
  == Scope
@@ -427,7 +535,7 @@ end
427
535
 
428
536
  it "warns of Non-reference in bibliography" do
429
537
  FileUtils.rm_f "test.err"
430
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
538
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
431
539
  #{VALIDATING_BLANK_HDR}
432
540
 
433
541
  == Normative References
@@ -438,7 +546,7 @@ end
438
546
 
439
547
  it "warns of Non-ISO reference in Normative References" do
440
548
  FileUtils.rm_f "test.err"
441
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
549
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
442
550
  #{VALIDATING_BLANK_HDR}
443
551
 
444
552
  [bibliography]
@@ -450,7 +558,7 @@ end
450
558
 
451
559
  it "warns that Scope contains subclauses" do
452
560
  FileUtils.rm_f "test.err"
453
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
561
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
454
562
  #{VALIDATING_BLANK_HDR}
455
563
 
456
564
  == Scope
@@ -463,7 +571,7 @@ end
463
571
 
464
572
  it "warns that Table should have title" do
465
573
  FileUtils.rm_f "test.err"
466
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
574
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
467
575
  #{VALIDATING_BLANK_HDR}
468
576
 
469
577
  |===
@@ -475,7 +583,7 @@ end
475
583
 
476
584
  it "gives Style warning if number not broken up in threes" do
477
585
  FileUtils.rm_f "test.err"
478
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
586
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
479
587
  #{VALIDATING_BLANK_HDR}
480
588
 
481
589
  == Clause
@@ -486,7 +594,7 @@ end
486
594
 
487
595
  it "gives No style warning if number not broken up in threes is ISO reference" do
488
596
  FileUtils.rm_f "test.err"
489
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
597
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
490
598
  #{VALIDATING_BLANK_HDR}
491
599
 
492
600
  == Clause
@@ -497,7 +605,7 @@ end
497
605
 
498
606
  it "Style warning if decimal point" do
499
607
  FileUtils.rm_f "test.err"
500
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
608
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
501
609
  #{VALIDATING_BLANK_HDR}
502
610
 
503
611
  == Clause
@@ -508,7 +616,7 @@ end
508
616
 
509
617
  it "Style warning if billion used" do
510
618
  FileUtils.rm_f "test.err"
511
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
619
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
512
620
  #{VALIDATING_BLANK_HDR}
513
621
 
514
622
  == Clause
@@ -519,7 +627,7 @@ end
519
627
 
520
628
  it "Style warning if no space before percent sign" do
521
629
  FileUtils.rm_f "test.err"
522
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
630
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
523
631
  #{VALIDATING_BLANK_HDR}
524
632
 
525
633
  == Clause
@@ -530,7 +638,7 @@ end
530
638
 
531
639
  it "Style warning if unbracketed tolerance before percent sign" do
532
640
  FileUtils.rm_f "test.err"
533
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
641
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
534
642
  #{VALIDATING_BLANK_HDR}
535
643
 
536
644
  == Clause
@@ -541,7 +649,7 @@ end
541
649
 
542
650
  it "Style warning if dots in abbreviation" do
543
651
  FileUtils.rm_f "test.err"
544
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
652
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
545
653
  #{VALIDATING_BLANK_HDR}
546
654
 
547
655
  == Clause
@@ -552,7 +660,7 @@ end
552
660
 
553
661
  it "No Style warning if dots in abbreviation are e.g." do
554
662
  FileUtils.rm_f "test.err"
555
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
663
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
556
664
  #{VALIDATING_BLANK_HDR}
557
665
 
558
666
  == Clause
@@ -563,7 +671,7 @@ end
563
671
 
564
672
  it "Style warning if ppm used" do
565
673
  FileUtils.rm_f "test.err"
566
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
674
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
567
675
  #{VALIDATING_BLANK_HDR}
568
676
 
569
677
  == Clause
@@ -574,7 +682,7 @@ end
574
682
 
575
683
  it "Style warning if space between number and degree" do
576
684
  FileUtils.rm_f "test.err"
577
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
685
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
578
686
  #{VALIDATING_BLANK_HDR}
579
687
 
580
688
  == Clause
@@ -585,7 +693,7 @@ end
585
693
 
586
694
  it "Style warning if no space between number and SI unit" do
587
695
  FileUtils.rm_f "test.err"
588
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
696
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
589
697
  #{VALIDATING_BLANK_HDR}
590
698
 
591
699
  == Clause
@@ -596,7 +704,7 @@ end
596
704
 
597
705
  it "Style warning if mins used" do
598
706
  FileUtils.rm_f "test.err"
599
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
707
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
600
708
  #{VALIDATING_BLANK_HDR}
601
709
 
602
710
  == Clause
@@ -607,7 +715,7 @@ end
607
715
 
608
716
  # can't test: our asciidoc template won't allow this to be generated
609
717
  # 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
718
+ # expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true) }.to output(%r{non-standard unit}).to_stderr
611
719
  # #{VALIDATING_BLANK_HDR}
612
720
  #
613
721
  # INPUT
@@ -615,7 +723,7 @@ end
615
723
 
616
724
  # can't test: we strip out any such content from Normative references preemptively
617
725
  #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
726
+ #expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true) }.to output(%r{normative references contains subclauses}).to_stderr
619
727
  ##{VALIDATING_BLANK_HDR}
620
728
  #
621
729
  #[bibliography]
@@ -627,7 +735,7 @@ end
627
735
 
628
736
  it "Style warning if two Symbols and Abbreviated Terms sections" do
629
737
  FileUtils.rm_f "test.err"
630
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
738
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
631
739
  #{VALIDATING_BLANK_HDR}
632
740
 
633
741
  == Terms and Abbreviations
@@ -641,7 +749,7 @@ end
641
749
 
642
750
  it "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
643
751
  FileUtils.rm_f "test.err"
644
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
752
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
645
753
  #{VALIDATING_BLANK_HDR}
646
754
 
647
755
  == Symbols and Abbreviated Terms
@@ -653,7 +761,7 @@ end
653
761
 
654
762
  it "Warning if missing foreword" do
655
763
  FileUtils.rm_f "test.err"
656
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
764
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
657
765
  #{VALIDATING_BLANK_HDR}
658
766
 
659
767
  == Symbols and Abbreviated Terms
@@ -661,11 +769,27 @@ it "Warning if missing foreword" do
661
769
  Paragraph
662
770
  INPUT
663
771
  expect(File.read("test.err")).to include "Initial section must be (content) Foreword"
772
+
773
+ FileUtils.rm_f "test.err"
774
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
775
+ = Document title
776
+ Author
777
+ :docfile: test.adoc
778
+ :nodoc:
779
+ :no-isobib:
780
+ :doctype: amendment
781
+
782
+ == Symbols and Abbreviated Terms
783
+
784
+ Paragraph
785
+ INPUT
786
+ expect(File.read("test.err")).not_to include "Initial section must be (content) Foreword"
787
+
664
788
  end
665
789
 
666
790
  it "Warning if do not start with scope or introduction" do
667
791
  FileUtils.rm_f "test.err"
668
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
792
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
669
793
  #{VALIDATING_BLANK_HDR}
670
794
  Foreword
671
795
 
@@ -674,11 +798,29 @@ it "Warning if do not start with scope or introduction" do
674
798
  Paragraph
675
799
  INPUT
676
800
  expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
801
+
802
+ FileUtils.rm_f "test.err"
803
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
804
+ = Document title
805
+ Author
806
+ :docfile: test.adoc
807
+ :nodoc:
808
+ :no-isobib:
809
+ :doctype: amendment
810
+
811
+ Foreword
812
+
813
+ == Symbols and Abbreviated Terms
814
+
815
+ Paragraph
816
+ INPUT
817
+ expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
818
+
677
819
  end
678
820
 
679
821
  it "Warning if introduction not followed by scope" do
680
822
  FileUtils.rm_f "test.err"
681
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
823
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
682
824
  #{VALIDATING_BLANK_HDR}
683
825
 
684
826
  .Foreword
@@ -691,11 +833,32 @@ it "Warning if introduction not followed by scope" do
691
833
  Paragraph
692
834
  INPUT
693
835
  expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
836
+
837
+ FileUtils.rm_f "test.err"
838
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
839
+ = Document title
840
+ Author
841
+ :docfile: test.adoc
842
+ :nodoc:
843
+ :no-isobib:
844
+ :doctype: amendment
845
+
846
+ .Foreword
847
+ Foreword
848
+
849
+ == Introduction
850
+
851
+ == Symbols and Abbreviated Terms
852
+
853
+ Paragraph
854
+ INPUT
855
+ expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
856
+
694
857
  end
695
858
 
696
859
  it "Warning if normative references not followed by terms and definitions" do
697
860
  FileUtils.rm_f "test.err"
698
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
861
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
699
862
  #{VALIDATING_BLANK_HDR}
700
863
 
701
864
  .Foreword
@@ -711,11 +874,35 @@ it "Warning if normative references not followed by terms and definitions" do
711
874
  Paragraph
712
875
  INPUT
713
876
  expect(File.read("test.err")).to include "Normative References must be followed by Terms and Definitions"
877
+
878
+ FileUtils.rm_f "test.err"
879
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
880
+ = Document title
881
+ Author
882
+ :docfile: test.adoc
883
+ :nodoc:
884
+ :no-isobib:
885
+ :doctype: amendment
886
+
887
+ .Foreword
888
+ Foreword
889
+
890
+ == Scope
891
+
892
+ [bibliography]
893
+ == Normative References
894
+
895
+ == Symbols and Abbreviated Terms
896
+
897
+ Paragraph
898
+ INPUT
899
+ expect(File.read("test.err")).not_to include "Normative References must be followed by Terms and Definitions"
900
+
714
901
  end
715
902
 
716
903
  it "Warning if there are no clauses in the document" do
717
904
  FileUtils.rm_f "test.err"
718
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
905
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
719
906
  #{VALIDATING_BLANK_HDR}
720
907
 
721
908
  .Foreword
@@ -732,11 +919,35 @@ it "Warning if there are no clauses in the document" do
732
919
 
733
920
  INPUT
734
921
  expect(File.read("test.err")).to include "Document must contain at least one clause"
922
+
923
+ FileUtils.rm_f "test.err"
924
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
925
+ = Document title
926
+ Author
927
+ :docfile: test.adoc
928
+ :nodoc:
929
+ :no-isobib:
930
+ :doctype: amendment
931
+
932
+ .Foreword
933
+ Foreword
934
+
935
+ == Scope
936
+
937
+ [bibliography]
938
+ == Normative References
939
+
940
+ == Terms and Definitions
941
+
942
+ == Symbols and Abbreviated Terms
943
+
944
+ INPUT
945
+ expect(File.read("test.err")).not_to include "Document must contain at least one clause"
735
946
  end
736
947
 
737
948
  it "Warning if scope occurs after Terms and Definitions" do
738
949
  FileUtils.rm_f "test.err"
739
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
950
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
740
951
  #{VALIDATING_BLANK_HDR}
741
952
 
742
953
  .Foreword
@@ -755,11 +966,38 @@ it "Warning if scope occurs after Terms and Definitions" do
755
966
 
756
967
  INPUT
757
968
  expect(File.read("test.err")).to include "Scope must occur before Terms and Definitions"
969
+
970
+ FileUtils.rm_f "test.err"
971
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
972
+ = Document title
973
+ Author
974
+ :docfile: test.adoc
975
+ :nodoc:
976
+ :no-isobib:
977
+ :doctype: amendment
978
+
979
+ .Foreword
980
+ Foreword
981
+
982
+ == Scope
983
+
984
+ [bibliography]
985
+ == Normative References
986
+
987
+ == Terms and Definitions
988
+
989
+ == Clause
990
+
991
+ == Scope
992
+
993
+ INPUT
994
+ expect(File.read("test.err")).not_to include "Scope must occur before Terms and Definitions"
995
+
758
996
  end
759
997
 
760
998
  it "Warning if Symbols and Abbreviated Terms does not occur immediately after Terms and Definitions" do
761
999
  FileUtils.rm_f "test.err"
762
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1000
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
763
1001
  #{VALIDATING_BLANK_HDR}
764
1002
 
765
1003
  .Foreword
@@ -778,11 +1016,39 @@ it "Warning if Symbols and Abbreviated Terms does not occur immediately after Te
778
1016
 
779
1017
  INPUT
780
1018
  expect(File.read("test.err")).to include "Only annexes and references can follow clauses"
1019
+
1020
+ FileUtils.rm_f "test.err"
1021
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1022
+ = Document title
1023
+ Author
1024
+ :docfile: test.adoc
1025
+ :nodoc:
1026
+ :no-isobib:
1027
+ :doctype: amendment
1028
+
1029
+
1030
+ .Foreword
1031
+ Foreword
1032
+
1033
+ == Scope
1034
+
1035
+ [bibliography]
1036
+ == Normative References
1037
+
1038
+ == Terms and Definitions
1039
+
1040
+ == Clause
1041
+
1042
+ == Symbols and Abbreviated Terms
1043
+
1044
+ INPUT
1045
+ expect(File.read("test.err")).not_to include "Only annexes and references can follow clauses"
1046
+
781
1047
  end
782
1048
 
783
1049
  it "Warning if no normative references" do
784
1050
  FileUtils.rm_f "test.err"
785
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1051
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
786
1052
  #{VALIDATING_BLANK_HDR}
787
1053
 
788
1054
  .Foreword
@@ -805,11 +1071,42 @@ it "Warning if no normative references" do
805
1071
 
806
1072
  INPUT
807
1073
  expect(File.read("test.err")).to include "Document must include (references) Normative References"
1074
+
1075
+ FileUtils.rm_f "test.err"
1076
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1077
+ = Document title
1078
+ Author
1079
+ :docfile: test.adoc
1080
+ :nodoc:
1081
+ :no-isobib:
1082
+ :doctype: amendment
1083
+
1084
+ .Foreword
1085
+ Foreword
1086
+
1087
+ == Scope
1088
+
1089
+ == Terms and Definitions
1090
+
1091
+ == Clause
1092
+
1093
+ [appendix]
1094
+ == Appendix A
1095
+
1096
+ [appendix]
1097
+ == Appendix B
1098
+
1099
+ [appendix]
1100
+ == Appendix C
1101
+
1102
+ INPUT
1103
+ expect(File.read("test.err")).not_to include "Document must include (references) Normative References"
1104
+
808
1105
  end
809
1106
 
810
1107
  it "Warning if final section is not named Bibliography" do
811
1108
  FileUtils.rm_f "test.err"
812
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1109
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
813
1110
  #{VALIDATING_BLANK_HDR}
814
1111
 
815
1112
  .Foreword
@@ -838,11 +1135,48 @@ it "Warning if final section is not named Bibliography" do
838
1135
 
839
1136
  INPUT
840
1137
  expect(File.read("test.err")).to include "There are sections after the final Bibliography"
1138
+
1139
+ FileUtils.rm_f "test.err"
1140
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1141
+ = Document title
1142
+ Author
1143
+ :docfile: test.adoc
1144
+ :nodoc:
1145
+ :no-isobib:
1146
+ :doctype: amendment
1147
+
1148
+ .Foreword
1149
+ Foreword
1150
+
1151
+ == Scope
1152
+
1153
+ [bibliography]
1154
+ == Normative References
1155
+
1156
+ == Terms and Definitions
1157
+
1158
+ == Clause
1159
+
1160
+ [appendix]
1161
+ == Appendix A
1162
+
1163
+ [appendix]
1164
+ == Appendix B
1165
+
1166
+ [bibliography]
1167
+ == Bibliography
1168
+
1169
+ [bibliography]
1170
+ == Appendix C
1171
+
1172
+ INPUT
1173
+ expect(File.read("test.err")).not_to include "There are sections after the final Bibliography"
1174
+
841
1175
  end
842
1176
 
843
1177
  it "Warning if final section is not styled Bibliography" do
844
1178
  FileUtils.rm_f "test.err"
845
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1179
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
846
1180
  #{VALIDATING_BLANK_HDR}
847
1181
 
848
1182
  .Foreword
@@ -867,11 +1201,45 @@ it "Warning if final section is not styled Bibliography" do
867
1201
 
868
1202
  INPUT
869
1203
  expect(File.read("test.err")).to include "Section not marked up as [bibliography]"
1204
+
1205
+
1206
+ FileUtils.rm_f "test.err"
1207
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1208
+ = Document title
1209
+ Author
1210
+ :docfile: test.adoc
1211
+ :nodoc:
1212
+ :no-isobib:
1213
+ :doctype: amendment
1214
+
1215
+ .Foreword
1216
+ Foreword
1217
+
1218
+ == Scope
1219
+
1220
+ [bibliography]
1221
+ == Normative References
1222
+
1223
+ == Terms and Definitions
1224
+
1225
+ == Clause
1226
+
1227
+ [appendix]
1228
+ == Appendix A
1229
+
1230
+ [appendix]
1231
+ == Appendix B
1232
+
1233
+ == Bibliography
1234
+
1235
+ INPUT
1236
+ expect(File.read("test.err")).not_to include "Section not marked up as [bibliography]"
1237
+
870
1238
  end
871
1239
 
872
1240
  it "Warning if English title intro and no French title intro" do
873
1241
  FileUtils.rm_f "test.err"
874
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1242
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
875
1243
  = Document title
876
1244
  Author
877
1245
  :docfile: test.adoc
@@ -885,7 +1253,7 @@ end
885
1253
 
886
1254
  it "Warning if French title intro and no English title intro" do
887
1255
  FileUtils.rm_f "test.err"
888
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1256
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
889
1257
  = Document title
890
1258
  Author
891
1259
  :docfile: test.adoc
@@ -900,7 +1268,7 @@ end
900
1268
 
901
1269
  it "Warning if English title and no French intro" do
902
1270
  FileUtils.rm_f "test.err"
903
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1271
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
904
1272
  = Document title
905
1273
  Author
906
1274
  :docfile: test.adoc
@@ -914,7 +1282,7 @@ end
914
1282
 
915
1283
  it "Warning if French title and no English title" do
916
1284
  FileUtils.rm_f "test.err"
917
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1285
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
918
1286
  = Document title
919
1287
  Author
920
1288
  :docfile: test.adoc
@@ -928,7 +1296,7 @@ end
928
1296
 
929
1297
  it "Warning if English title part and no French title part" do
930
1298
  FileUtils.rm_f "test.err"
931
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1299
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
932
1300
  = Document title
933
1301
  Author
934
1302
  :docfile: test.adoc
@@ -942,7 +1310,7 @@ end
942
1310
 
943
1311
  it "Warning if French title part and no English title part" do
944
1312
  FileUtils.rm_f "test.err"
945
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1313
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
946
1314
  = Document title
947
1315
  Author
948
1316
  :docfile: test.adoc
@@ -956,7 +1324,7 @@ end
956
1324
 
957
1325
  it "Warning if non-IEC document with subpart" do
958
1326
  FileUtils.rm_f "test.err"
959
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1327
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
960
1328
  = Document title
961
1329
  Author
962
1330
  :docfile: test.adoc
@@ -972,14 +1340,14 @@ end
972
1340
 
973
1341
  it "No warning if joint IEC/non-IEC document with subpart" do
974
1342
  FileUtils.rm_f "test.err"
975
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1343
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
976
1344
  = Document title
977
1345
  Author
978
1346
  :docfile: test.adoc
979
1347
  :nodoc:
980
1348
  :docnumber: 10
981
1349
  :partnumber: 1-1
982
- :publisher: ISO,IEC
1350
+ :publisher: ISO;IEC
983
1351
  :no-isobib:
984
1352
 
985
1353
  INPUT
@@ -988,7 +1356,7 @@ end
988
1356
 
989
1357
  it "Warning if main title contains document type" do
990
1358
  FileUtils.rm_f "test.err"
991
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1359
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
992
1360
  = Document title
993
1361
  Author
994
1362
  :docfile: test.adoc
@@ -1002,7 +1370,7 @@ end
1002
1370
 
1003
1371
  it "Warning if intro title contains document type" do
1004
1372
  FileUtils.rm_f "test.err"
1005
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1373
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1006
1374
  = Document title
1007
1375
  Author
1008
1376
  :docfile: test.adoc
@@ -1016,7 +1384,7 @@ end
1016
1384
 
1017
1385
  it "Each first-level subclause must have a title" do
1018
1386
  FileUtils.rm_f "test.err"
1019
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1387
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1020
1388
  #{VALIDATING_BLANK_HDR}
1021
1389
  == Clause
1022
1390
 
@@ -1027,7 +1395,7 @@ end
1027
1395
 
1028
1396
  it "All subclauses must have a title, or none" do
1029
1397
  FileUtils.rm_f "test.err"
1030
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1398
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1031
1399
  #{VALIDATING_BLANK_HDR}
1032
1400
  == Clause
1033
1401
 
@@ -1042,7 +1410,7 @@ end
1042
1410
 
1043
1411
  it "Warning if subclause is only child of its parent, or none" do
1044
1412
  FileUtils.rm_f "test.err"
1045
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1413
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1046
1414
  #{VALIDATING_BLANK_HDR}
1047
1415
  == Clause
1048
1416
 
@@ -1054,7 +1422,7 @@ end
1054
1422
 
1055
1423
  it "Warning if invalid technical committee type" do
1056
1424
  FileUtils.rm_f "test.err"
1057
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1425
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1058
1426
  = Document title
1059
1427
  Author
1060
1428
  :docfile: test.adoc
@@ -1068,7 +1436,7 @@ end
1068
1436
 
1069
1437
  it "Warning if invalid subcommittee type" do
1070
1438
  FileUtils.rm_f "test.err"
1071
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1439
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1072
1440
  = Document title
1073
1441
  Author
1074
1442
  :docfile: test.adoc
@@ -1082,7 +1450,7 @@ end
1082
1450
 
1083
1451
  it "Warning if invalid subcommittee type" do
1084
1452
  FileUtils.rm_f "test.err"
1085
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1453
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1086
1454
  = Document title
1087
1455
  Author
1088
1456
  :docfile: test.adoc
@@ -1096,7 +1464,7 @@ end
1096
1464
 
1097
1465
  it "Warning if 'see' crossreference points to normative section" do
1098
1466
  FileUtils.rm_f "test.err"
1099
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1467
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1100
1468
  #{VALIDATING_BLANK_HDR}
1101
1469
  [[terms]]
1102
1470
  == Terms and Definitions
@@ -1109,7 +1477,7 @@ end
1109
1477
 
1110
1478
  it "Warning if 'see' reference points to normative reference" do
1111
1479
  FileUtils.rm_f "test.err"
1112
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1480
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1113
1481
  #{VALIDATING_BLANK_HDR}
1114
1482
  [bibliography]
1115
1483
  == Normative References
@@ -1123,7 +1491,7 @@ end
1123
1491
 
1124
1492
  it "Warning if term definition starts with article" do
1125
1493
  FileUtils.rm_f "test.err"
1126
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1494
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1127
1495
  #{VALIDATING_BLANK_HDR}
1128
1496
  == Terms and Definitions
1129
1497
 
@@ -1136,7 +1504,7 @@ end
1136
1504
 
1137
1505
  it "Warning if term definition ends with period" do
1138
1506
  FileUtils.rm_f "test.err"
1139
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1507
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1140
1508
  #{VALIDATING_BLANK_HDR}
1141
1509
  == Terms and Definitions
1142
1510
 
@@ -1149,7 +1517,7 @@ end
1149
1517
 
1150
1518
  it "validates document against ISO XML schema" do
1151
1519
  FileUtils.rm_f "test.err"
1152
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1520
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1153
1521
  #{VALIDATING_BLANK_HDR}
1154
1522
 
1155
1523
  [align=mid-air]
@@ -1160,7 +1528,7 @@ end
1160
1528
 
1161
1529
  it "Warn if more than 7 levels of subclause" do
1162
1530
  FileUtils.rm_f "test.err"
1163
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1531
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1164
1532
  = Document title
1165
1533
  Author
1166
1534
  :docfile: test.adoc
@@ -1193,7 +1561,7 @@ end
1193
1561
 
1194
1562
  it "Do not warn if not more than 7 levels of subclause" do
1195
1563
  FileUtils.rm_f "test.err"
1196
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1564
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1197
1565
  = Document title
1198
1566
  Author
1199
1567
  :docfile: test.adoc
@@ -1223,7 +1591,7 @@ end
1223
1591
 
1224
1592
  it "Warn if term citation in Terms & Definitions not preceded with italicised term" do
1225
1593
  FileUtils.rm_f "test.err"
1226
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1594
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1227
1595
  #{VALIDATING_BLANK_HDR}
1228
1596
  == Terms and Definitions
1229
1597
 
@@ -1237,7 +1605,7 @@ end
1237
1605
 
1238
1606
  it "Warn if an undated reference has no associated footnote" do
1239
1607
  FileUtils.rm_f "test.err"
1240
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1608
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1241
1609
  #{VALIDATING_BLANK_HDR}
1242
1610
 
1243
1611
  [bibliography]