metanorma-iso 1.5.11 → 1.6.1

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 +83 -0
  3. data/README.adoc +5 -6
  4. data/lib/asciidoctor/iso/base.rb +5 -5
  5. data/lib/asciidoctor/iso/basicdoc.rng +50 -3
  6. data/lib/asciidoctor/iso/boilerplate-fr.xml +2 -2
  7. data/lib/asciidoctor/iso/cleanup.rb +33 -6
  8. data/lib/asciidoctor/iso/front.rb +5 -0
  9. data/lib/asciidoctor/iso/isodoc.rng +61 -3
  10. data/lib/asciidoctor/iso/isostandard-amd.rng +8 -4
  11. data/lib/asciidoctor/iso/isostandard.rng +27 -10
  12. data/lib/asciidoctor/iso/validate.rb +13 -1
  13. data/lib/asciidoctor/iso/validate_section.rb +21 -9
  14. data/lib/isodoc/iso/base_convert.rb +2 -1
  15. data/lib/isodoc/iso/html/header.html +4 -8
  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/wordstyle.css +67 -67
  25. data/lib/isodoc/iso/html/wordstyle.scss +67 -67
  26. data/lib/isodoc/iso/html_convert.rb +4 -0
  27. data/lib/isodoc/iso/i18n-en.yaml +1 -0
  28. data/lib/isodoc/iso/i18n-fr.yaml +2 -0
  29. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
  30. data/lib/isodoc/iso/i18n.rb +10 -11
  31. data/lib/isodoc/iso/iso.amendment.xsl +381 -86
  32. data/lib/isodoc/iso/iso.international-standard.xsl +381 -86
  33. data/lib/isodoc/iso/metadata.rb +1 -0
  34. data/lib/isodoc/iso/sections.rb +1 -1
  35. data/lib/isodoc/iso/word_convert.rb +4 -0
  36. data/lib/isodoc/iso/xref.rb +34 -8
  37. data/lib/metanorma/iso/processor.rb +11 -9
  38. data/lib/metanorma/iso/version.rb +1 -1
  39. data/metanorma-iso.gemspec +2 -2
  40. data/spec/asciidoctor-iso/amd_spec.rb +14 -14
  41. data/spec/asciidoctor-iso/base_spec.rb +20 -18
  42. data/spec/asciidoctor-iso/blocks_spec.rb +22 -22
  43. data/spec/asciidoctor-iso/cleanup_spec.rb +36 -30
  44. data/spec/asciidoctor-iso/inline_spec.rb +7 -7
  45. data/spec/asciidoctor-iso/lists_spec.rb +9 -9
  46. data/spec/asciidoctor-iso/refs_spec.rb +177 -146
  47. data/spec/asciidoctor-iso/section_spec.rb +12 -7
  48. data/spec/asciidoctor-iso/table_spec.rb +4 -4
  49. data/spec/asciidoctor-iso/validate_spec.rb +401 -85
  50. data/spec/isodoc/amd_spec.rb +13 -13
  51. data/spec/isodoc/blocks_spec.rb +1 -0
  52. data/spec/isodoc/metadata_spec.rb +2 -0
  53. data/spec/isodoc/ref_spec.rb +2 -2
  54. data/spec/isodoc/section_spec.rb +20 -0
  55. data/spec/isodoc/xref_spec.rb +12 -0
  56. metadata +7 -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 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
@@ -25,7 +25,7 @@ RSpec.describe Asciidoctor::ISO do
25
25
 
26
26
  it "Warns of missing scope" do
27
27
  FileUtils.rm_f "test.err"
28
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
28
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
29
29
  = Document title
30
30
  Author
31
31
  :docfile: test.adoc
@@ -36,8 +36,9 @@ it "Warns of missing scope" do
36
36
  text
37
37
  INPUT
38
38
  expect(File.read("test.err")).to include "Scope clause missing"
39
+
39
40
  FileUtils.rm_f "test.err"
40
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
41
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
41
42
  = Document title
42
43
  Author
43
44
  :docfile: test.adoc
@@ -49,11 +50,23 @@ it "Warns of missing scope" do
49
50
  INPUT
50
51
  expect(File.read("test.err")).not_to include "Scope clause missing"
51
52
 
53
+ FileUtils.rm_f "test.err"
54
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
55
+ = Document title
56
+ Author
57
+ :docfile: test.adoc
58
+ :nodoc:
59
+ :no-isobib:
60
+ :doctype: amendment
61
+
62
+ text
63
+ INPUT
64
+ expect(File.read("test.err")).not_to include "Scope clause missing"
52
65
  end
53
66
 
54
67
  it "Warns of missing normative references" do
55
68
  FileUtils.rm_f "test.err"
56
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
69
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
57
70
  = Document title
58
71
  Author
59
72
  :docfile: test.adoc
@@ -64,8 +77,9 @@ it "Warns of missing normative references" do
64
77
  text
65
78
  INPUT
66
79
  expect(File.read("test.err")).to include "Normative references missing"
80
+
67
81
  FileUtils.rm_f "test.err"
68
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
82
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
69
83
  = Document title
70
84
  Author
71
85
  :docfile: test.adoc
@@ -78,11 +92,24 @@ it "Warns of missing normative references" do
78
92
  INPUT
79
93
  expect(File.read("test.err")).not_to include "Normative references missing"
80
94
 
95
+ FileUtils.rm_f "test.err"
96
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
97
+ = Document title
98
+ Author
99
+ :docfile: test.adoc
100
+ :nodoc:
101
+ :no-isobib:
102
+ :doctype: amendment
103
+
104
+ text
105
+ INPUT
106
+ expect(File.read("test.err")).not_to include "Normative references missing"
107
+
81
108
  end
82
109
 
83
110
  it "Warns of missing terms & definitions" do
84
111
  FileUtils.rm_f "test.err"
85
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
112
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
86
113
  = Document title
87
114
  Author
88
115
  :docfile: test.adoc
@@ -93,8 +120,9 @@ it "Warns of missing terms & definitions" do
93
120
  text
94
121
  INPUT
95
122
  expect(File.read("test.err")).to include "Terms & definitions missing"
123
+
96
124
  FileUtils.rm_f "test.err"
97
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
125
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
98
126
  = Document title
99
127
  Author
100
128
  :docfile: test.adoc
@@ -107,12 +135,23 @@ it "Warns of missing terms & definitions" do
107
135
  INPUT
108
136
  expect(File.read("test.err")).not_to include "Terms & definitions missing"
109
137
 
110
- end
138
+ FileUtils.rm_f "test.err"
139
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
140
+ = Document title
141
+ Author
142
+ :docfile: test.adoc
143
+ :nodoc:
144
+ :no-isobib:
145
+ :doctype: amendment
111
146
 
147
+ text
148
+ INPUT
149
+ expect(File.read("test.err")).not_to include "Terms & definitions missing"
150
+ end
112
151
 
113
152
  it "Warns of illegal doctype" do
114
153
  FileUtils.rm_f "test.err"
115
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
154
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
116
155
  = Document title
117
156
  Author
118
157
  :docfile: test.adoc
@@ -127,7 +166,7 @@ end
127
166
 
128
167
  it "Warns of illegal script" do
129
168
  FileUtils.rm_f "test.err"
130
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
169
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
131
170
  = Document title
132
171
  Author
133
172
  :docfile: test.adoc
@@ -142,7 +181,7 @@ end
142
181
 
143
182
  it "Warns of illegal stage" do
144
183
  FileUtils.rm_f "test.err"
145
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
184
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
146
185
  = Document title
147
186
  Author
148
187
  :docfile: test.adoc
@@ -157,7 +196,7 @@ end
157
196
 
158
197
  it "Warns of illegal substage" do
159
198
  FileUtils.rm_f "test.err"
160
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
199
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
161
200
  = Document title
162
201
  Author
163
202
  :docfile: test.adoc
@@ -173,7 +212,7 @@ end
173
212
 
174
213
  it "Warns of illegal iteration" do
175
214
  FileUtils.rm_f "test.err"
176
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
215
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
177
216
  = Document title
178
217
  Author
179
218
  :docfile: test.adoc
@@ -189,7 +228,7 @@ end
189
228
 
190
229
  it "Warns of illegal script" do
191
230
  FileUtils.rm_f "test.err"
192
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
231
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
193
232
  = Document title
194
233
  Author
195
234
  :docfile: test.adoc
@@ -202,10 +241,27 @@ it "Warns of illegal script" do
202
241
  expect(File.read("test.err")).to include "pizza is not a recognised script"
203
242
  end
204
243
 
244
+ it "warns that technical report may contain requirement" do
245
+ FileUtils.rm_f "test.err"
246
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
247
+ = Document title
248
+ Author
249
+ :docfile: test.adoc
250
+ :nodoc:
251
+ :no-isobib:
252
+ :doctype: technical-report
253
+
254
+ == Random clause
255
+
256
+ The widget is required not to be larger than 15 cm.
257
+ INPUT
258
+ expect(File.read("test.err")).to include "Technical Report clause may contain requirement"
259
+ end
260
+
205
261
 
206
262
  it "warns that introduction may contain requirement" do
207
263
  FileUtils.rm_f "test.err"
208
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
264
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
209
265
  #{VALIDATING_BLANK_HDR}
210
266
  == Introduction
211
267
 
@@ -216,7 +272,7 @@ end
216
272
 
217
273
  it "warns that foreword may contain recommendation" do
218
274
  FileUtils.rm_f "test.err"
219
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
275
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
220
276
  #{VALIDATING_BLANK_HDR}
221
277
 
222
278
  It is not recommended that widgets should be larger than 15 cm.
@@ -228,7 +284,7 @@ end
228
284
 
229
285
  it "warns that foreword may contain permission" do
230
286
  FileUtils.rm_f "test.err"
231
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
287
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
232
288
  #{VALIDATING_BLANK_HDR}
233
289
 
234
290
  No widget is required to be larger than 15 cm.
@@ -240,7 +296,7 @@ end
240
296
 
241
297
  it "warns that scope may contain recommendation" do
242
298
  FileUtils.rm_f "test.err"
243
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
299
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
244
300
  #{VALIDATING_BLANK_HDR}
245
301
 
246
302
  == Scope
@@ -251,7 +307,7 @@ end
251
307
 
252
308
  it "warns that definition may contain requirement" do
253
309
  FileUtils.rm_f "test.err"
254
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
310
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
255
311
  #{VALIDATING_BLANK_HDR}
256
312
 
257
313
  == Terms and Definitions
@@ -266,7 +322,7 @@ end
266
322
 
267
323
  it "warns that term example may contain recommendation" do
268
324
  FileUtils.rm_f "test.err"
269
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
325
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
270
326
  #{VALIDATING_BLANK_HDR}
271
327
 
272
328
  == Terms and Definitions
@@ -281,7 +337,7 @@ end
281
337
 
282
338
  it "warns that note may contain recommendation" do
283
339
  FileUtils.rm_f "test.err"
284
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
340
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
285
341
  #{VALIDATING_BLANK_HDR}
286
342
 
287
343
  NOTE: It is not recommended that widgets should be larger than 15 cm.
@@ -291,7 +347,7 @@ end
291
347
 
292
348
  it "warns that footnote may contain recommendation" do
293
349
  FileUtils.rm_f "test.err"
294
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
350
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
295
351
  #{VALIDATING_BLANK_HDR}
296
352
 
297
353
  footnote:[It is not recommended that widgets should be larger than 15 cm.]
@@ -301,7 +357,7 @@ end
301
357
 
302
358
  it "warns that term source is not in expected format" do
303
359
  FileUtils.rm_f "test.err"
304
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
360
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
305
361
  #{VALIDATING_BLANK_HDR}
306
362
 
307
363
  [.source]
@@ -312,7 +368,7 @@ end
312
368
 
313
369
  it "warns that figure does not have title" do
314
370
  FileUtils.rm_f "test.err"
315
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
371
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
316
372
  #{VALIDATING_BLANK_HDR}
317
373
 
318
374
  image::spec/examples/rice_images/rice_image1.png[]
@@ -322,7 +378,7 @@ end
322
378
 
323
379
  it "warns that callouts do not match annotations" do
324
380
  FileUtils.rm_f "test.err"
325
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
381
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
326
382
  #{VALIDATING_BLANK_HDR}
327
383
  [source,ruby]
328
384
  --
@@ -339,7 +395,7 @@ end
339
395
 
340
396
  it "warns that term source is not a real reference" do
341
397
  FileUtils.rm_f "test.err"
342
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
398
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
343
399
  #{VALIDATING_BLANK_HDR}
344
400
 
345
401
  [.source]
@@ -350,7 +406,7 @@ end
350
406
 
351
407
  it "warns that undated reference has locality" do
352
408
  FileUtils.rm_f "test.err"
353
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
409
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
354
410
  #{VALIDATING_BLANK_HDR}
355
411
 
356
412
  == Scope
@@ -365,7 +421,7 @@ end
365
421
 
366
422
  it "do not warn that undated reference which is a bibliographic reference has locality" do
367
423
  FileUtils.rm_f "test.err"
368
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
424
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
369
425
  #{VALIDATING_BLANK_HDR}
370
426
 
371
427
  == Scope
@@ -380,7 +436,7 @@ end
380
436
 
381
437
  it "do not warn that undated IEV reference has locality" do
382
438
  FileUtils.rm_f "test.err"
383
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
439
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
384
440
  #{VALIDATING_BLANK_HDR}
385
441
 
386
442
  == Scope
@@ -395,7 +451,7 @@ end
395
451
 
396
452
  it "do not warn that in print has locality" do
397
453
  FileUtils.rm_f "test.err"
398
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
454
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
399
455
  #{VALIDATING_BLANK_HDR}
400
456
 
401
457
  == Scope
@@ -410,7 +466,7 @@ end
410
466
 
411
467
  it "warns of Non-reference in bibliography" do
412
468
  FileUtils.rm_f "test.err"
413
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
469
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
414
470
  #{VALIDATING_BLANK_HDR}
415
471
 
416
472
  == Normative References
@@ -421,7 +477,7 @@ end
421
477
 
422
478
  it "warns of Non-ISO reference in Normative References" do
423
479
  FileUtils.rm_f "test.err"
424
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
480
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
425
481
  #{VALIDATING_BLANK_HDR}
426
482
 
427
483
  [bibliography]
@@ -433,7 +489,7 @@ end
433
489
 
434
490
  it "warns that Scope contains subclauses" do
435
491
  FileUtils.rm_f "test.err"
436
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
492
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
437
493
  #{VALIDATING_BLANK_HDR}
438
494
 
439
495
  == Scope
@@ -446,7 +502,7 @@ end
446
502
 
447
503
  it "warns that Table should have title" do
448
504
  FileUtils.rm_f "test.err"
449
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
505
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
450
506
  #{VALIDATING_BLANK_HDR}
451
507
 
452
508
  |===
@@ -458,7 +514,7 @@ end
458
514
 
459
515
  it "gives Style warning if number not broken up in threes" do
460
516
  FileUtils.rm_f "test.err"
461
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
517
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
462
518
  #{VALIDATING_BLANK_HDR}
463
519
 
464
520
  == Clause
@@ -469,7 +525,7 @@ end
469
525
 
470
526
  it "gives No style warning if number not broken up in threes is ISO reference" do
471
527
  FileUtils.rm_f "test.err"
472
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
528
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
473
529
  #{VALIDATING_BLANK_HDR}
474
530
 
475
531
  == Clause
@@ -480,7 +536,7 @@ end
480
536
 
481
537
  it "Style warning if decimal point" do
482
538
  FileUtils.rm_f "test.err"
483
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
539
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
484
540
  #{VALIDATING_BLANK_HDR}
485
541
 
486
542
  == Clause
@@ -491,7 +547,7 @@ end
491
547
 
492
548
  it "Style warning if billion used" do
493
549
  FileUtils.rm_f "test.err"
494
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
550
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
495
551
  #{VALIDATING_BLANK_HDR}
496
552
 
497
553
  == Clause
@@ -502,7 +558,7 @@ end
502
558
 
503
559
  it "Style warning if no space before percent sign" do
504
560
  FileUtils.rm_f "test.err"
505
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
561
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
506
562
  #{VALIDATING_BLANK_HDR}
507
563
 
508
564
  == Clause
@@ -513,7 +569,7 @@ end
513
569
 
514
570
  it "Style warning if unbracketed tolerance before percent sign" do
515
571
  FileUtils.rm_f "test.err"
516
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
572
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
517
573
  #{VALIDATING_BLANK_HDR}
518
574
 
519
575
  == Clause
@@ -524,7 +580,7 @@ end
524
580
 
525
581
  it "Style warning if dots in abbreviation" do
526
582
  FileUtils.rm_f "test.err"
527
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
583
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
528
584
  #{VALIDATING_BLANK_HDR}
529
585
 
530
586
  == Clause
@@ -535,7 +591,7 @@ end
535
591
 
536
592
  it "No Style warning if dots in abbreviation are e.g." do
537
593
  FileUtils.rm_f "test.err"
538
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
594
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
539
595
  #{VALIDATING_BLANK_HDR}
540
596
 
541
597
  == Clause
@@ -546,7 +602,7 @@ end
546
602
 
547
603
  it "Style warning if ppm used" do
548
604
  FileUtils.rm_f "test.err"
549
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
605
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
550
606
  #{VALIDATING_BLANK_HDR}
551
607
 
552
608
  == Clause
@@ -557,7 +613,7 @@ end
557
613
 
558
614
  it "Style warning if space between number and degree" do
559
615
  FileUtils.rm_f "test.err"
560
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
616
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
561
617
  #{VALIDATING_BLANK_HDR}
562
618
 
563
619
  == Clause
@@ -568,7 +624,7 @@ end
568
624
 
569
625
  it "Style warning if no space between number and SI unit" do
570
626
  FileUtils.rm_f "test.err"
571
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
627
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
572
628
  #{VALIDATING_BLANK_HDR}
573
629
 
574
630
  == Clause
@@ -579,7 +635,7 @@ end
579
635
 
580
636
  it "Style warning if mins used" do
581
637
  FileUtils.rm_f "test.err"
582
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
638
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
583
639
  #{VALIDATING_BLANK_HDR}
584
640
 
585
641
  == Clause
@@ -590,7 +646,7 @@ end
590
646
 
591
647
  # can't test: our asciidoc template won't allow this to be generated
592
648
  # it "Style warning if foreword contains subclauses" do
593
- # expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-standard unit}).to_stderr
649
+ # expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true) }.to output(%r{non-standard unit}).to_stderr
594
650
  # #{VALIDATING_BLANK_HDR}
595
651
  #
596
652
  # INPUT
@@ -598,7 +654,7 @@ end
598
654
 
599
655
  # can't test: we strip out any such content from Normative references preemptively
600
656
  #it "Style warning if Normative References contains subclauses" do
601
- #expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{normative references contains subclauses}).to_stderr
657
+ #expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true) }.to output(%r{normative references contains subclauses}).to_stderr
602
658
  ##{VALIDATING_BLANK_HDR}
603
659
  #
604
660
  #[bibliography]
@@ -610,7 +666,7 @@ end
610
666
 
611
667
  it "Style warning if two Symbols and Abbreviated Terms sections" do
612
668
  FileUtils.rm_f "test.err"
613
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
669
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
614
670
  #{VALIDATING_BLANK_HDR}
615
671
 
616
672
  == Terms and Abbreviations
@@ -624,7 +680,7 @@ end
624
680
 
625
681
  it "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
626
682
  FileUtils.rm_f "test.err"
627
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
683
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
628
684
  #{VALIDATING_BLANK_HDR}
629
685
 
630
686
  == Symbols and Abbreviated Terms
@@ -636,7 +692,7 @@ end
636
692
 
637
693
  it "Warning if missing foreword" do
638
694
  FileUtils.rm_f "test.err"
639
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
695
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
640
696
  #{VALIDATING_BLANK_HDR}
641
697
 
642
698
  == Symbols and Abbreviated Terms
@@ -644,11 +700,27 @@ it "Warning if missing foreword" do
644
700
  Paragraph
645
701
  INPUT
646
702
  expect(File.read("test.err")).to include "Initial section must be (content) Foreword"
703
+
704
+ FileUtils.rm_f "test.err"
705
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
706
+ = Document title
707
+ Author
708
+ :docfile: test.adoc
709
+ :nodoc:
710
+ :no-isobib:
711
+ :doctype: amendment
712
+
713
+ == Symbols and Abbreviated Terms
714
+
715
+ Paragraph
716
+ INPUT
717
+ expect(File.read("test.err")).not_to include "Initial section must be (content) Foreword"
718
+
647
719
  end
648
720
 
649
721
  it "Warning if do not start with scope or introduction" do
650
722
  FileUtils.rm_f "test.err"
651
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
723
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
652
724
  #{VALIDATING_BLANK_HDR}
653
725
  Foreword
654
726
 
@@ -657,11 +729,29 @@ it "Warning if do not start with scope or introduction" do
657
729
  Paragraph
658
730
  INPUT
659
731
  expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
732
+
733
+ FileUtils.rm_f "test.err"
734
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
735
+ = Document title
736
+ Author
737
+ :docfile: test.adoc
738
+ :nodoc:
739
+ :no-isobib:
740
+ :doctype: amendment
741
+
742
+ Foreword
743
+
744
+ == Symbols and Abbreviated Terms
745
+
746
+ Paragraph
747
+ INPUT
748
+ expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
749
+
660
750
  end
661
751
 
662
752
  it "Warning if introduction not followed by scope" do
663
753
  FileUtils.rm_f "test.err"
664
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
754
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
665
755
  #{VALIDATING_BLANK_HDR}
666
756
 
667
757
  .Foreword
@@ -674,11 +764,32 @@ it "Warning if introduction not followed by scope" do
674
764
  Paragraph
675
765
  INPUT
676
766
  expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
767
+
768
+ FileUtils.rm_f "test.err"
769
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
770
+ = Document title
771
+ Author
772
+ :docfile: test.adoc
773
+ :nodoc:
774
+ :no-isobib:
775
+ :doctype: amendment
776
+
777
+ .Foreword
778
+ Foreword
779
+
780
+ == Introduction
781
+
782
+ == Symbols and Abbreviated Terms
783
+
784
+ Paragraph
785
+ INPUT
786
+ expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
787
+
677
788
  end
678
789
 
679
790
  it "Warning if normative references not followed by terms and definitions" do
680
791
  FileUtils.rm_f "test.err"
681
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
792
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
682
793
  #{VALIDATING_BLANK_HDR}
683
794
 
684
795
  .Foreword
@@ -694,11 +805,35 @@ it "Warning if normative references not followed by terms and definitions" do
694
805
  Paragraph
695
806
  INPUT
696
807
  expect(File.read("test.err")).to include "Normative References must be followed by Terms and Definitions"
808
+
809
+ FileUtils.rm_f "test.err"
810
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
811
+ = Document title
812
+ Author
813
+ :docfile: test.adoc
814
+ :nodoc:
815
+ :no-isobib:
816
+ :doctype: amendment
817
+
818
+ .Foreword
819
+ Foreword
820
+
821
+ == Scope
822
+
823
+ [bibliography]
824
+ == Normative References
825
+
826
+ == Symbols and Abbreviated Terms
827
+
828
+ Paragraph
829
+ INPUT
830
+ expect(File.read("test.err")).not_to include "Normative References must be followed by Terms and Definitions"
831
+
697
832
  end
698
833
 
699
834
  it "Warning if there are no clauses in the document" do
700
835
  FileUtils.rm_f "test.err"
701
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
836
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
702
837
  #{VALIDATING_BLANK_HDR}
703
838
 
704
839
  .Foreword
@@ -715,11 +850,35 @@ it "Warning if there are no clauses in the document" do
715
850
 
716
851
  INPUT
717
852
  expect(File.read("test.err")).to include "Document must contain at least one clause"
853
+
854
+ FileUtils.rm_f "test.err"
855
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
856
+ = Document title
857
+ Author
858
+ :docfile: test.adoc
859
+ :nodoc:
860
+ :no-isobib:
861
+ :doctype: amendment
862
+
863
+ .Foreword
864
+ Foreword
865
+
866
+ == Scope
867
+
868
+ [bibliography]
869
+ == Normative References
870
+
871
+ == Terms and Definitions
872
+
873
+ == Symbols and Abbreviated Terms
874
+
875
+ INPUT
876
+ expect(File.read("test.err")).not_to include "Document must contain at least one clause"
718
877
  end
719
878
 
720
879
  it "Warning if scope occurs after Terms and Definitions" do
721
880
  FileUtils.rm_f "test.err"
722
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
881
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
723
882
  #{VALIDATING_BLANK_HDR}
724
883
 
725
884
  .Foreword
@@ -738,11 +897,38 @@ it "Warning if scope occurs after Terms and Definitions" do
738
897
 
739
898
  INPUT
740
899
  expect(File.read("test.err")).to include "Scope must occur before Terms and Definitions"
900
+
901
+ FileUtils.rm_f "test.err"
902
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
903
+ = Document title
904
+ Author
905
+ :docfile: test.adoc
906
+ :nodoc:
907
+ :no-isobib:
908
+ :doctype: amendment
909
+
910
+ .Foreword
911
+ Foreword
912
+
913
+ == Scope
914
+
915
+ [bibliography]
916
+ == Normative References
917
+
918
+ == Terms and Definitions
919
+
920
+ == Clause
921
+
922
+ == Scope
923
+
924
+ INPUT
925
+ expect(File.read("test.err")).not_to include "Scope must occur before Terms and Definitions"
926
+
741
927
  end
742
928
 
743
929
  it "Warning if Symbols and Abbreviated Terms does not occur immediately after Terms and Definitions" do
744
930
  FileUtils.rm_f "test.err"
745
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
931
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
746
932
  #{VALIDATING_BLANK_HDR}
747
933
 
748
934
  .Foreword
@@ -761,11 +947,39 @@ it "Warning if Symbols and Abbreviated Terms does not occur immediately after Te
761
947
 
762
948
  INPUT
763
949
  expect(File.read("test.err")).to include "Only annexes and references can follow clauses"
950
+
951
+ FileUtils.rm_f "test.err"
952
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
953
+ = Document title
954
+ Author
955
+ :docfile: test.adoc
956
+ :nodoc:
957
+ :no-isobib:
958
+ :doctype: amendment
959
+
960
+
961
+ .Foreword
962
+ Foreword
963
+
964
+ == Scope
965
+
966
+ [bibliography]
967
+ == Normative References
968
+
969
+ == Terms and Definitions
970
+
971
+ == Clause
972
+
973
+ == Symbols and Abbreviated Terms
974
+
975
+ INPUT
976
+ expect(File.read("test.err")).not_to include "Only annexes and references can follow clauses"
977
+
764
978
  end
765
979
 
766
980
  it "Warning if no normative references" do
767
981
  FileUtils.rm_f "test.err"
768
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
982
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
769
983
  #{VALIDATING_BLANK_HDR}
770
984
 
771
985
  .Foreword
@@ -788,11 +1002,42 @@ it "Warning if no normative references" do
788
1002
 
789
1003
  INPUT
790
1004
  expect(File.read("test.err")).to include "Document must include (references) Normative References"
1005
+
1006
+ FileUtils.rm_f "test.err"
1007
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1008
+ = Document title
1009
+ Author
1010
+ :docfile: test.adoc
1011
+ :nodoc:
1012
+ :no-isobib:
1013
+ :doctype: amendment
1014
+
1015
+ .Foreword
1016
+ Foreword
1017
+
1018
+ == Scope
1019
+
1020
+ == Terms and Definitions
1021
+
1022
+ == Clause
1023
+
1024
+ [appendix]
1025
+ == Appendix A
1026
+
1027
+ [appendix]
1028
+ == Appendix B
1029
+
1030
+ [appendix]
1031
+ == Appendix C
1032
+
1033
+ INPUT
1034
+ expect(File.read("test.err")).not_to include "Document must include (references) Normative References"
1035
+
791
1036
  end
792
1037
 
793
1038
  it "Warning if final section is not named Bibliography" do
794
1039
  FileUtils.rm_f "test.err"
795
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1040
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
796
1041
  #{VALIDATING_BLANK_HDR}
797
1042
 
798
1043
  .Foreword
@@ -821,11 +1066,48 @@ it "Warning if final section is not named Bibliography" do
821
1066
 
822
1067
  INPUT
823
1068
  expect(File.read("test.err")).to include "There are sections after the final Bibliography"
1069
+
1070
+ FileUtils.rm_f "test.err"
1071
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1072
+ = Document title
1073
+ Author
1074
+ :docfile: test.adoc
1075
+ :nodoc:
1076
+ :no-isobib:
1077
+ :doctype: amendment
1078
+
1079
+ .Foreword
1080
+ Foreword
1081
+
1082
+ == Scope
1083
+
1084
+ [bibliography]
1085
+ == Normative References
1086
+
1087
+ == Terms and Definitions
1088
+
1089
+ == Clause
1090
+
1091
+ [appendix]
1092
+ == Appendix A
1093
+
1094
+ [appendix]
1095
+ == Appendix B
1096
+
1097
+ [bibliography]
1098
+ == Bibliography
1099
+
1100
+ [bibliography]
1101
+ == Appendix C
1102
+
1103
+ INPUT
1104
+ expect(File.read("test.err")).not_to include "There are sections after the final Bibliography"
1105
+
824
1106
  end
825
1107
 
826
1108
  it "Warning if final section is not styled Bibliography" do
827
1109
  FileUtils.rm_f "test.err"
828
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1110
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
829
1111
  #{VALIDATING_BLANK_HDR}
830
1112
 
831
1113
  .Foreword
@@ -850,11 +1132,45 @@ it "Warning if final section is not styled Bibliography" do
850
1132
 
851
1133
  INPUT
852
1134
  expect(File.read("test.err")).to include "Section not marked up as [bibliography]"
1135
+
1136
+
1137
+ FileUtils.rm_f "test.err"
1138
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1139
+ = Document title
1140
+ Author
1141
+ :docfile: test.adoc
1142
+ :nodoc:
1143
+ :no-isobib:
1144
+ :doctype: amendment
1145
+
1146
+ .Foreword
1147
+ Foreword
1148
+
1149
+ == Scope
1150
+
1151
+ [bibliography]
1152
+ == Normative References
1153
+
1154
+ == Terms and Definitions
1155
+
1156
+ == Clause
1157
+
1158
+ [appendix]
1159
+ == Appendix A
1160
+
1161
+ [appendix]
1162
+ == Appendix B
1163
+
1164
+ == Bibliography
1165
+
1166
+ INPUT
1167
+ expect(File.read("test.err")).not_to include "Section not marked up as [bibliography]"
1168
+
853
1169
  end
854
1170
 
855
1171
  it "Warning if English title intro and no French title intro" do
856
1172
  FileUtils.rm_f "test.err"
857
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1173
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
858
1174
  = Document title
859
1175
  Author
860
1176
  :docfile: test.adoc
@@ -868,7 +1184,7 @@ end
868
1184
 
869
1185
  it "Warning if French title intro and no English title intro" do
870
1186
  FileUtils.rm_f "test.err"
871
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1187
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
872
1188
  = Document title
873
1189
  Author
874
1190
  :docfile: test.adoc
@@ -883,7 +1199,7 @@ end
883
1199
 
884
1200
  it "Warning if English title and no French intro" do
885
1201
  FileUtils.rm_f "test.err"
886
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1202
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
887
1203
  = Document title
888
1204
  Author
889
1205
  :docfile: test.adoc
@@ -897,7 +1213,7 @@ end
897
1213
 
898
1214
  it "Warning if French title and no English title" do
899
1215
  FileUtils.rm_f "test.err"
900
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1216
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
901
1217
  = Document title
902
1218
  Author
903
1219
  :docfile: test.adoc
@@ -911,7 +1227,7 @@ end
911
1227
 
912
1228
  it "Warning if English title part and no French title part" do
913
1229
  FileUtils.rm_f "test.err"
914
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1230
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
915
1231
  = Document title
916
1232
  Author
917
1233
  :docfile: test.adoc
@@ -925,7 +1241,7 @@ end
925
1241
 
926
1242
  it "Warning if French title part and no English title part" do
927
1243
  FileUtils.rm_f "test.err"
928
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1244
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
929
1245
  = Document title
930
1246
  Author
931
1247
  :docfile: test.adoc
@@ -939,7 +1255,7 @@ end
939
1255
 
940
1256
  it "Warning if non-IEC document with subpart" do
941
1257
  FileUtils.rm_f "test.err"
942
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1258
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
943
1259
  = Document title
944
1260
  Author
945
1261
  :docfile: test.adoc
@@ -955,14 +1271,14 @@ end
955
1271
 
956
1272
  it "No warning if joint IEC/non-IEC document with subpart" do
957
1273
  FileUtils.rm_f "test.err"
958
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1274
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
959
1275
  = Document title
960
1276
  Author
961
1277
  :docfile: test.adoc
962
1278
  :nodoc:
963
1279
  :docnumber: 10
964
1280
  :partnumber: 1-1
965
- :publisher: ISO,IEC
1281
+ :publisher: ISO;IEC
966
1282
  :no-isobib:
967
1283
 
968
1284
  INPUT
@@ -971,7 +1287,7 @@ end
971
1287
 
972
1288
  it "Warning if main title contains document type" do
973
1289
  FileUtils.rm_f "test.err"
974
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1290
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
975
1291
  = Document title
976
1292
  Author
977
1293
  :docfile: test.adoc
@@ -985,7 +1301,7 @@ end
985
1301
 
986
1302
  it "Warning if intro title contains document type" do
987
1303
  FileUtils.rm_f "test.err"
988
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1304
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
989
1305
  = Document title
990
1306
  Author
991
1307
  :docfile: test.adoc
@@ -999,7 +1315,7 @@ end
999
1315
 
1000
1316
  it "Each first-level subclause must have a title" do
1001
1317
  FileUtils.rm_f "test.err"
1002
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1318
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1003
1319
  #{VALIDATING_BLANK_HDR}
1004
1320
  == Clause
1005
1321
 
@@ -1010,7 +1326,7 @@ end
1010
1326
 
1011
1327
  it "All subclauses must have a title, or none" do
1012
1328
  FileUtils.rm_f "test.err"
1013
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1329
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1014
1330
  #{VALIDATING_BLANK_HDR}
1015
1331
  == Clause
1016
1332
 
@@ -1025,7 +1341,7 @@ end
1025
1341
 
1026
1342
  it "Warning if subclause is only child of its parent, or none" do
1027
1343
  FileUtils.rm_f "test.err"
1028
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1344
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1029
1345
  #{VALIDATING_BLANK_HDR}
1030
1346
  == Clause
1031
1347
 
@@ -1037,7 +1353,7 @@ end
1037
1353
 
1038
1354
  it "Warning if invalid technical committee type" do
1039
1355
  FileUtils.rm_f "test.err"
1040
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1356
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1041
1357
  = Document title
1042
1358
  Author
1043
1359
  :docfile: test.adoc
@@ -1051,7 +1367,7 @@ end
1051
1367
 
1052
1368
  it "Warning if invalid subcommittee type" do
1053
1369
  FileUtils.rm_f "test.err"
1054
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1370
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1055
1371
  = Document title
1056
1372
  Author
1057
1373
  :docfile: test.adoc
@@ -1065,7 +1381,7 @@ end
1065
1381
 
1066
1382
  it "Warning if invalid subcommittee type" do
1067
1383
  FileUtils.rm_f "test.err"
1068
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1384
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1069
1385
  = Document title
1070
1386
  Author
1071
1387
  :docfile: test.adoc
@@ -1079,7 +1395,7 @@ end
1079
1395
 
1080
1396
  it "Warning if 'see' crossreference points to normative section" do
1081
1397
  FileUtils.rm_f "test.err"
1082
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1398
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1083
1399
  #{VALIDATING_BLANK_HDR}
1084
1400
  [[terms]]
1085
1401
  == Terms and Definitions
@@ -1092,7 +1408,7 @@ end
1092
1408
 
1093
1409
  it "Warning if 'see' reference points to normative reference" do
1094
1410
  FileUtils.rm_f "test.err"
1095
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1411
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1096
1412
  #{VALIDATING_BLANK_HDR}
1097
1413
  [bibliography]
1098
1414
  == Normative References
@@ -1106,7 +1422,7 @@ end
1106
1422
 
1107
1423
  it "Warning if term definition starts with article" do
1108
1424
  FileUtils.rm_f "test.err"
1109
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1425
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1110
1426
  #{VALIDATING_BLANK_HDR}
1111
1427
  == Terms and Definitions
1112
1428
 
@@ -1119,7 +1435,7 @@ end
1119
1435
 
1120
1436
  it "Warning if term definition ends with period" do
1121
1437
  FileUtils.rm_f "test.err"
1122
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1438
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1123
1439
  #{VALIDATING_BLANK_HDR}
1124
1440
  == Terms and Definitions
1125
1441
 
@@ -1132,7 +1448,7 @@ end
1132
1448
 
1133
1449
  it "validates document against ISO XML schema" do
1134
1450
  FileUtils.rm_f "test.err"
1135
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1451
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1136
1452
  #{VALIDATING_BLANK_HDR}
1137
1453
 
1138
1454
  [align=mid-air]
@@ -1143,7 +1459,7 @@ end
1143
1459
 
1144
1460
  it "Warn if more than 7 levels of subclause" do
1145
1461
  FileUtils.rm_f "test.err"
1146
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1462
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1147
1463
  = Document title
1148
1464
  Author
1149
1465
  :docfile: test.adoc
@@ -1176,7 +1492,7 @@ end
1176
1492
 
1177
1493
  it "Do not warn if not more than 7 levels of subclause" do
1178
1494
  FileUtils.rm_f "test.err"
1179
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1495
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1180
1496
  = Document title
1181
1497
  Author
1182
1498
  :docfile: test.adoc
@@ -1206,7 +1522,7 @@ end
1206
1522
 
1207
1523
  it "Warn if term citation in Terms & Definitions not preceded with italicised term" do
1208
1524
  FileUtils.rm_f "test.err"
1209
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1525
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1210
1526
  #{VALIDATING_BLANK_HDR}
1211
1527
  == Terms and Definitions
1212
1528
 
@@ -1220,7 +1536,7 @@ end
1220
1536
 
1221
1537
  it "Warn if an undated reference has no associated footnote" do
1222
1538
  FileUtils.rm_f "test.err"
1223
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
1539
+ Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true, agree_to_terms: true)
1224
1540
  #{VALIDATING_BLANK_HDR}
1225
1541
 
1226
1542
  [bibliography]