metanorma-iso 1.5.14 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +17 -0
- data/.rubocop.yml +0 -4
- data/lib/asciidoctor/iso/base.rb +13 -13
- data/lib/asciidoctor/iso/basicdoc.rng +20 -3
- data/lib/asciidoctor/iso/cleanup.rb +1 -1
- data/lib/asciidoctor/iso/front.rb +5 -5
- data/lib/asciidoctor/iso/isodoc.rng +118 -4
- data/lib/asciidoctor/iso/isostandard-amd.rng +11 -4
- data/lib/asciidoctor/iso/isostandard.rng +22 -10
- data/lib/asciidoctor/iso/validate.rb +78 -0
- data/lib/asciidoctor/iso/validate_section.rb +12 -9
- data/lib/isodoc/iso/html/header.html +12 -12
- data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html_convert.rb +2 -2
- data/lib/isodoc/iso/i18n-en.yaml +2 -0
- data/lib/isodoc/iso/i18n-fr.yaml +1 -1
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +451 -208
- data/lib/isodoc/iso/iso.international-standard.xsl +451 -208
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +2 -2
- data/lib/isodoc/iso/xref.rb +28 -12
- data/lib/metanorma/iso/processor.rb +11 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +2 -2
- data/spec/asciidoctor-iso/amd_spec.rb +575 -573
- data/spec/asciidoctor-iso/base_spec.rb +449 -458
- data/spec/asciidoctor-iso/blocks_spec.rb +333 -288
- data/spec/asciidoctor-iso/cleanup_spec.rb +814 -699
- data/spec/asciidoctor-iso/inline_spec.rb +116 -91
- data/spec/asciidoctor-iso/lists_spec.rb +128 -121
- data/spec/asciidoctor-iso/refs_spec.rb +308 -250
- data/spec/asciidoctor-iso/section_spec.rb +273 -242
- data/spec/asciidoctor-iso/table_spec.rb +258 -242
- data/spec/asciidoctor-iso/validate_spec.rb +1223 -919
- data/spec/isodoc/amd_spec.rb +967 -946
- data/spec/isodoc/blocks_spec.rb +530 -507
- data/spec/isodoc/i18n_spec.rb +953 -911
- data/spec/isodoc/inline_spec.rb +355 -293
- data/spec/isodoc/iso_spec.rb +340 -316
- data/spec/isodoc/metadata_spec.rb +392 -382
- data/spec/isodoc/postproc_spec.rb +834 -656
- data/spec/isodoc/ref_spec.rb +374 -331
- data/spec/isodoc/section_spec.rb +608 -525
- data/spec/isodoc/table_spec.rb +472 -411
- data/spec/isodoc/terms_spec.rb +209 -185
- data/spec/isodoc/xref_spec.rb +1370 -1236
- data/spec/metanorma/processor_spec.rb +28 -26
- data/spec/spec_helper.rb +184 -189
- metadata +7 -10
- data/.rubocop.ribose.yml +0 -66
- data/lib/metanorma/iso/fonts_manifest.yaml +0 -6
- data/spec/assets/xref_error.adoc +0 -7
@@ -3,343 +3,464 @@ require "fileutils"
|
|
3
3
|
|
4
4
|
RSpec.describe Asciidoctor::ISO do
|
5
5
|
context "when xref_error.adoc compilation" do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
next if file.match?(/adoc$/)
|
6
|
+
it "generates error file" do
|
7
|
+
File.write("xref_error.adoc", <<~"CONTENT")
|
8
|
+
= X
|
9
|
+
A
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
== Clause
|
12
|
+
|
13
|
+
<<a,b>>
|
14
|
+
CONTENT
|
15
15
|
|
16
|
-
it "generates error file" do
|
17
16
|
expect do
|
17
|
+
mock_pdf
|
18
18
|
Metanorma::Compile
|
19
19
|
.new
|
20
|
-
.compile("
|
21
|
-
end.to(change { File.exist?("
|
20
|
+
.compile("xref_error.adoc", type: "iso", no_install_fonts: true)
|
21
|
+
end.to(change { File.exist?("xref_error.err") }
|
22
22
|
.from(false).to(true))
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
it "Warns of
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
26
|
+
it "Warns of image names not compliant with DRG" do
|
27
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
28
|
+
= Document title
|
29
|
+
Author
|
30
|
+
:docfile: test.adoc
|
31
|
+
:nodoc:
|
32
|
+
:no-isobib:
|
33
|
+
:docnumber: 1000
|
34
|
+
:partnumber: 1
|
35
|
+
:edition: 2
|
36
|
+
:amendment-number: 3
|
37
|
+
|
38
|
+
.Split-it-right sample divider
|
39
|
+
image::spec/examples/rice_images/rice_image1.png[]
|
40
|
+
image::spec/examples/rice_images/SL1000-1_ed2amd3fig1.png[]
|
41
|
+
image::spec/examples/rice_images/1001_ed2amd3fig1.png[]
|
42
|
+
image::spec/examples/rice_images/ISO_1213_1.png[]
|
43
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figA.png[]
|
44
|
+
|
45
|
+
|===
|
46
|
+
|a |b
|
47
|
+
|
48
|
+
a|image::spec/examples/rice_images/1000-1_ed2amd3figTab1.png[]#{' '}
|
49
|
+
a|image::spec/examples/rice_images/1000-1_ed2amd3fig2.png[]
|
50
|
+
|===
|
51
|
+
|
52
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figTab2.png[]
|
53
|
+
|
54
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figA1.png[]
|
55
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig1a.png[]
|
56
|
+
|
57
|
+
.Stages of gelatinization
|
58
|
+
====
|
59
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig1b.png[]
|
60
|
+
|
61
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig4.png[]
|
62
|
+
====
|
63
|
+
|
64
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig5_f.png[]
|
65
|
+
|
66
|
+
[appendix]
|
67
|
+
== Annex
|
68
|
+
image::spec/examples/rice_images/1000-1_ed2amd3figA2.png[]
|
69
|
+
image::spec/examples/rice_images/1000-1_ed2amd3fig3.png[]
|
70
|
+
|
71
|
+
INPUT
|
72
|
+
expect(File.read("test.err")).to include \
|
73
|
+
"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 \
|
75
|
+
"image name spec/examples/rice_images/1001_ed2amd3fig1.png does not match DRG requirements: " \
|
76
|
+
"expect 1000-1_ed2amd3fig"
|
77
|
+
expect(File.read("test.err")).not_to include \
|
78
|
+
"image name spec/examples/rice_images/SL1000-1_ed2amd3fig1.png does not match DRG requirements: " \
|
79
|
+
"expect 1000-1_ed2amd3fig"
|
80
|
+
expect(File.read("test.err")).not_to include \
|
81
|
+
"image name spec/examples/rice_images/ISO_1213_1.png does not match DRG requirements: expect 1000-1_ed2amd3fig"
|
82
|
+
expect(File.read("test.err")).to include \
|
83
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3figA.png does not match DRG requirements"
|
84
|
+
expect(File.read("test.err")).not_to include \
|
85
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3figTab1.png does not match DRG requirements"
|
86
|
+
expect(File.read("test.err")).not_to include \
|
87
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3figTab1.png is under a table but is not so labelled"
|
88
|
+
expect(File.read("test.err")).to include \
|
89
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig2.png is under a table but is not so labelled"
|
90
|
+
expect(File.read("test.err")).to include \
|
91
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3figTab2.png is labelled as under a table but is not"
|
92
|
+
expect(File.read("test.err")).not_to include \
|
93
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig1.png is labelled as under a table but is not"
|
94
|
+
expect(File.read("test.err")).not_to include \
|
95
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3figA2.png is under an annex but is not so labelled"
|
96
|
+
expect(File.read("test.err")).to include \
|
97
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig3.png is under an annex but is not so labelled"
|
98
|
+
expect(File.read("test.err")).to include \
|
99
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3figA1.png is labelled as under an annex but is not"
|
100
|
+
expect(File.read("test.err")).not_to include \
|
101
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig1.png is labelled as under an annex but is not"
|
102
|
+
expect(File.read("test.err")).not_to include \
|
103
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig1b.png has a subfigure letter but is not a subfigure"
|
104
|
+
expect(File.read("test.err")).to include \
|
105
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig4.png does not have a subfigure letter but is a subfigure"
|
106
|
+
expect(File.read("test.err")).to include \
|
107
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig1a.png has a subfigure letter but is not a subfigure"
|
108
|
+
expect(File.read("test.err")).not_to include \
|
109
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig1.png has a subfigure letter but is not a subfigure"
|
110
|
+
expect(File.read("test.err")).to include \
|
111
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig5_f.png expected to have suffix _e"
|
112
|
+
expect(File.read("test.err")).not_to include \
|
113
|
+
"image name spec/examples/rice_images/1000-1_ed2amd3fig1.png expected to have suffix _e"
|
114
|
+
end
|
51
115
|
|
52
|
-
|
116
|
+
context "Warns of missing scope" do
|
117
|
+
it "Scope clause missing" do
|
118
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
119
|
+
= Document title
|
120
|
+
Author
|
121
|
+
:docfile: test.adoc
|
122
|
+
:nodoc:
|
123
|
+
:no-isobib:
|
124
|
+
:doctype: pizza
|
125
|
+
|
126
|
+
text
|
127
|
+
INPUT
|
53
128
|
|
54
|
-
|
55
|
-
|
56
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
57
|
-
= Document title
|
58
|
-
Author
|
59
|
-
:docfile: test.adoc
|
60
|
-
:nodoc:
|
61
|
-
:no-isobib:
|
62
|
-
:doctype: pizza
|
63
|
-
|
64
|
-
text
|
65
|
-
INPUT
|
66
|
-
expect(File.read("test.err")).to include "Normative references missing"
|
67
|
-
FileUtils.rm_f "test.err"
|
68
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
69
|
-
= Document title
|
70
|
-
Author
|
71
|
-
:docfile: test.adoc
|
72
|
-
:nodoc:
|
73
|
-
:no-isobib:
|
74
|
-
:doctype: pizza
|
75
|
-
|
76
|
-
[bibliography]
|
77
|
-
== Normative references
|
78
|
-
INPUT
|
79
|
-
expect(File.read("test.err")).not_to include "Normative references missing"
|
129
|
+
expect(File.read("test.err")).to include "Scope clause missing"
|
130
|
+
end
|
80
131
|
|
81
|
-
|
132
|
+
it "Scope clause not missing 1" do
|
133
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
134
|
+
= Document title
|
135
|
+
Author
|
136
|
+
:docfile: test.adoc
|
137
|
+
:nodoc:
|
138
|
+
:no-isobib:
|
139
|
+
:doctype: pizza
|
82
140
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
Author
|
88
|
-
:docfile: test.adoc
|
89
|
-
:nodoc:
|
90
|
-
:no-isobib:
|
91
|
-
:doctype: pizza
|
92
|
-
|
93
|
-
text
|
94
|
-
INPUT
|
95
|
-
expect(File.read("test.err")).to include "Terms & definitions missing"
|
96
|
-
FileUtils.rm_f "test.err"
|
97
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
98
|
-
= Document title
|
99
|
-
Author
|
100
|
-
:docfile: test.adoc
|
101
|
-
:nodoc:
|
102
|
-
:no-isobib:
|
103
|
-
:doctype: pizza
|
104
|
-
|
105
|
-
== Terms and definitions
|
106
|
-
=== Term 1
|
107
|
-
INPUT
|
108
|
-
expect(File.read("test.err")).not_to include "Terms & definitions missing"
|
141
|
+
== Scope
|
142
|
+
INPUT
|
143
|
+
expect(File.read("test.err")).not_to include "Scope clause missing"
|
144
|
+
end
|
109
145
|
|
110
|
-
|
146
|
+
it "Scope clause not missing 2" do
|
147
|
+
FileUtils.rm_f "test.err"
|
148
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
149
|
+
= Document title
|
150
|
+
Author
|
151
|
+
:docfile: test.adoc
|
152
|
+
:nodoc:
|
153
|
+
:no-isobib:
|
154
|
+
:doctype: amendment
|
155
|
+
|
156
|
+
text
|
157
|
+
INPUT
|
158
|
+
expect(File.read("test.err")).not_to include "Scope clause missing"
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
context "Warns of missing normative references" do
|
163
|
+
it "Normative references missing" do
|
164
|
+
FileUtils.rm_f "test.err"
|
165
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
166
|
+
= Document title
|
167
|
+
Author
|
168
|
+
:docfile: test.adoc
|
169
|
+
:nodoc:
|
170
|
+
:no-isobib:
|
171
|
+
:doctype: pizza
|
172
|
+
|
173
|
+
text
|
174
|
+
INPUT
|
175
|
+
expect(File.read("test.err")).to include "Normative references missing"
|
176
|
+
end
|
177
|
+
|
178
|
+
it "Normative references not missing 1" do
|
179
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
180
|
+
= Document title
|
181
|
+
Author
|
182
|
+
:docfile: test.adoc
|
183
|
+
:nodoc:
|
184
|
+
:no-isobib:
|
185
|
+
:doctype: pizza
|
186
|
+
|
187
|
+
[bibliography]
|
188
|
+
== Normative references
|
189
|
+
INPUT
|
190
|
+
expect(File.read("test.err")).not_to include "Normative references missing"
|
191
|
+
end
|
192
|
+
|
193
|
+
it "Normative references not missing 2" do
|
194
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
195
|
+
= Document title
|
196
|
+
Author
|
197
|
+
:docfile: test.adoc
|
198
|
+
:nodoc:
|
199
|
+
:no-isobib:
|
200
|
+
:doctype: amendment
|
201
|
+
|
202
|
+
text
|
203
|
+
INPUT
|
204
|
+
expect(File.read("test.err")).not_to include "Normative references missing"
|
205
|
+
end
|
206
|
+
end
|
111
207
|
|
208
|
+
context "Warns of missing terms & definitions" do
|
209
|
+
it "Terms & definitions missing" do
|
210
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
211
|
+
= Document title
|
212
|
+
Author
|
213
|
+
:docfile: test.adoc
|
214
|
+
:nodoc:
|
215
|
+
:no-isobib:
|
216
|
+
:doctype: pizza
|
217
|
+
|
218
|
+
text
|
219
|
+
INPUT
|
220
|
+
expect(File.read("test.err")).to include "Terms & definitions missing"
|
221
|
+
end
|
222
|
+
|
223
|
+
it "Terms & definitions not missing 1" do
|
224
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
225
|
+
= Document title
|
226
|
+
Author
|
227
|
+
:docfile: test.adoc
|
228
|
+
:nodoc:
|
229
|
+
:no-isobib:
|
230
|
+
:doctype: pizza
|
231
|
+
|
232
|
+
== Terms and definitions
|
233
|
+
=== Term 1
|
234
|
+
INPUT
|
235
|
+
expect(File.read("test.err")).not_to include "Terms & definitions missing"
|
236
|
+
end
|
112
237
|
|
113
|
-
it "
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
:doctype: pizza
|
238
|
+
it "Terms & definitions not missing 2" do
|
239
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
240
|
+
= Document title
|
241
|
+
Author
|
242
|
+
:docfile: test.adoc
|
243
|
+
:nodoc:
|
244
|
+
:no-isobib:
|
245
|
+
:doctype: amendment
|
122
246
|
|
123
|
-
|
124
|
-
|
247
|
+
text
|
248
|
+
INPUT
|
249
|
+
expect(File.read("test.err")).not_to include "Terms & definitions missing"
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
it "Warns of illegal doctype" do
|
254
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
255
|
+
= Document title
|
256
|
+
Author
|
257
|
+
:docfile: test.adoc
|
258
|
+
:nodoc:
|
259
|
+
:no-isobib:
|
260
|
+
:doctype: pizza
|
261
|
+
|
262
|
+
text
|
263
|
+
INPUT
|
125
264
|
expect(File.read("test.err")).to include "pizza is not a recognised document type"
|
126
|
-
end
|
265
|
+
end
|
127
266
|
|
128
|
-
it "Warns of illegal script" do
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
INPUT
|
267
|
+
it "Warns of illegal script" do
|
268
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
269
|
+
= Document title
|
270
|
+
Author
|
271
|
+
:docfile: test.adoc
|
272
|
+
:nodoc:
|
273
|
+
:no-isobib:
|
274
|
+
:script: pizza
|
275
|
+
|
276
|
+
text
|
277
|
+
INPUT
|
140
278
|
expect(File.read("test.err")).to include "pizza is not a recognised script"
|
141
|
-
end
|
279
|
+
end
|
142
280
|
|
143
|
-
it "Warns of illegal stage" do
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
INPUT
|
281
|
+
it "Warns of illegal stage" do
|
282
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
283
|
+
= Document title
|
284
|
+
Author
|
285
|
+
:docfile: test.adoc
|
286
|
+
:nodoc:
|
287
|
+
:no-isobib:
|
288
|
+
:status: pizza
|
289
|
+
|
290
|
+
text
|
291
|
+
INPUT
|
155
292
|
expect(File.read("test.err")).to include "pizza is not a recognised stage"
|
156
|
-
end
|
293
|
+
end
|
157
294
|
|
158
|
-
it "Warns of illegal substage" do
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
INPUT
|
295
|
+
it "Warns of illegal substage" do
|
296
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
297
|
+
= Document title
|
298
|
+
Author
|
299
|
+
:docfile: test.adoc
|
300
|
+
:nodoc:
|
301
|
+
:no-isobib:
|
302
|
+
:status: 60
|
303
|
+
:docsubstage: pizza
|
304
|
+
|
305
|
+
text
|
306
|
+
INPUT
|
171
307
|
expect(File.read("test.err")).to include "pizza is not a recognised substage"
|
172
|
-
end
|
308
|
+
end
|
173
309
|
|
174
|
-
it "Warns of illegal iteration" do
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
INPUT
|
310
|
+
it "Warns of illegal iteration" do
|
311
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
312
|
+
= Document title
|
313
|
+
Author
|
314
|
+
:docfile: test.adoc
|
315
|
+
:nodoc:
|
316
|
+
:no-isobib:
|
317
|
+
:status: 60
|
318
|
+
:iteration: pizza
|
319
|
+
|
320
|
+
text
|
321
|
+
INPUT
|
187
322
|
expect(File.read("test.err")).to include "pizza is not a recognised iteration"
|
188
|
-
end
|
323
|
+
end
|
189
324
|
|
190
|
-
it "Warns of illegal script" do
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
INPUT
|
325
|
+
it "Warns of illegal script" do
|
326
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
327
|
+
= Document title
|
328
|
+
Author
|
329
|
+
:docfile: test.adoc
|
330
|
+
:nodoc:
|
331
|
+
:no-isobib:
|
332
|
+
:script: pizza
|
333
|
+
|
334
|
+
text
|
335
|
+
INPUT
|
202
336
|
expect(File.read("test.err")).to include "pizza is not a recognised script"
|
203
|
-
end
|
337
|
+
end
|
204
338
|
|
205
|
-
it "warns that technical report may contain requirement" do
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
:doctype: technical-report
|
339
|
+
it "warns that technical report may contain requirement" do
|
340
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
341
|
+
= Document title
|
342
|
+
Author
|
343
|
+
:docfile: test.adoc
|
344
|
+
:nodoc:
|
345
|
+
:no-isobib:
|
346
|
+
:doctype: technical-report
|
214
347
|
|
215
|
-
|
348
|
+
== Random clause
|
216
349
|
|
217
|
-
|
218
|
-
|
350
|
+
The widget is required not to be larger than 15 cm.
|
351
|
+
INPUT
|
219
352
|
expect(File.read("test.err")).to include "Technical Report clause may contain requirement"
|
220
|
-
end
|
221
|
-
|
353
|
+
end
|
222
354
|
|
223
|
-
it "warns that introduction may contain requirement" do
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
== Introduction
|
355
|
+
it "warns that introduction may contain requirement" do
|
356
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
357
|
+
#{VALIDATING_BLANK_HDR}
|
358
|
+
== Introduction
|
228
359
|
|
229
|
-
|
230
|
-
|
360
|
+
The widget is required not to be larger than 15 cm.
|
361
|
+
INPUT
|
231
362
|
expect(File.read("test.err")).to include "Introduction may contain requirement"
|
232
|
-
end
|
363
|
+
end
|
233
364
|
|
234
|
-
it "warns that foreword may contain recommendation" do
|
235
|
-
|
236
|
-
|
237
|
-
#{VALIDATING_BLANK_HDR}
|
365
|
+
it "warns that foreword may contain recommendation" do
|
366
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
367
|
+
#{VALIDATING_BLANK_HDR}
|
238
368
|
|
239
|
-
|
369
|
+
It is not recommended that widgets should be larger than 15 cm.
|
240
370
|
|
241
|
-
|
242
|
-
|
371
|
+
== Clause
|
372
|
+
INPUT
|
243
373
|
expect(File.read("test.err")).to include "Foreword may contain recommendation"
|
244
|
-
end
|
374
|
+
end
|
245
375
|
|
246
|
-
it "warns that foreword may contain permission" do
|
247
|
-
|
248
|
-
|
249
|
-
#{VALIDATING_BLANK_HDR}
|
376
|
+
it "warns that foreword may contain permission" do
|
377
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
378
|
+
#{VALIDATING_BLANK_HDR}
|
250
379
|
|
251
|
-
|
380
|
+
No widget is required to be larger than 15 cm.
|
252
381
|
|
253
|
-
|
254
|
-
|
382
|
+
== Clause
|
383
|
+
INPUT
|
255
384
|
expect(File.read("test.err")).to include "Foreword may contain permission"
|
256
|
-
end
|
385
|
+
end
|
257
386
|
|
258
|
-
it "warns that scope may contain recommendation" do
|
259
|
-
|
260
|
-
|
261
|
-
#{VALIDATING_BLANK_HDR}
|
387
|
+
it "warns that scope may contain recommendation" do
|
388
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
389
|
+
#{VALIDATING_BLANK_HDR}
|
262
390
|
|
263
|
-
|
264
|
-
|
265
|
-
|
391
|
+
== Scope
|
392
|
+
It is not recommended that widgets should be larger than 15 cm.
|
393
|
+
INPUT
|
266
394
|
expect(File.read("test.err")).to include "Scope may contain recommendation"
|
267
|
-
end
|
395
|
+
end
|
268
396
|
|
269
|
-
it "warns that definition may contain requirement" do
|
270
|
-
|
271
|
-
|
272
|
-
#{VALIDATING_BLANK_HDR}
|
397
|
+
it "warns that definition may contain requirement" do
|
398
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
399
|
+
#{VALIDATING_BLANK_HDR}
|
273
400
|
|
274
|
-
|
401
|
+
== Terms and Definitions
|
275
402
|
|
276
|
-
|
403
|
+
=== Term1
|
277
404
|
|
278
|
-
|
405
|
+
It is required that there is a definition.
|
279
406
|
|
280
|
-
|
407
|
+
INPUT
|
281
408
|
expect(File.read("test.err")).to include "Definition may contain requirement"
|
282
|
-
end
|
409
|
+
end
|
283
410
|
|
284
|
-
it "warns that term example may contain recommendation" do
|
285
|
-
|
286
|
-
|
287
|
-
#{VALIDATING_BLANK_HDR}
|
411
|
+
it "warns that term example may contain recommendation" do
|
412
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
413
|
+
#{VALIDATING_BLANK_HDR}
|
288
414
|
|
289
|
-
|
415
|
+
== Terms and Definitions
|
290
416
|
|
291
|
-
|
417
|
+
=== Term
|
292
418
|
|
293
|
-
|
294
|
-
|
295
|
-
|
419
|
+
[example]
|
420
|
+
It is not recommended that widgets should be larger than 15 cm.
|
421
|
+
INPUT
|
296
422
|
expect(File.read("test.err")).to include "Example may contain recommendation"
|
297
|
-
end
|
423
|
+
end
|
298
424
|
|
299
|
-
it "warns that note may contain recommendation" do
|
300
|
-
|
301
|
-
|
302
|
-
#{VALIDATING_BLANK_HDR}
|
425
|
+
it "warns that note may contain recommendation" do
|
426
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
427
|
+
#{VALIDATING_BLANK_HDR}
|
303
428
|
|
304
|
-
|
305
|
-
|
429
|
+
NOTE: It is not recommended that widgets should be larger than 15 cm.
|
430
|
+
INPUT
|
306
431
|
expect(File.read("test.err")).to include "Note may contain recommendation"
|
307
|
-
end
|
432
|
+
end
|
308
433
|
|
309
|
-
it "warns that footnote may contain recommendation" do
|
310
|
-
|
311
|
-
|
312
|
-
#{VALIDATING_BLANK_HDR}
|
434
|
+
it "warns that footnote may contain recommendation" do
|
435
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
436
|
+
#{VALIDATING_BLANK_HDR}
|
313
437
|
|
314
|
-
|
315
|
-
|
438
|
+
footnote:[It is not recommended that widgets should be larger than 15 cm.]
|
439
|
+
INPUT
|
316
440
|
expect(File.read("test.err")).to include "Footnote may contain recommendation"
|
317
|
-
end
|
441
|
+
end
|
318
442
|
|
319
|
-
it "warns that term source is not in expected format" do
|
320
|
-
|
321
|
-
|
322
|
-
#{VALIDATING_BLANK_HDR}
|
443
|
+
it "warns that term source is not in expected format" do
|
444
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
445
|
+
#{VALIDATING_BLANK_HDR}
|
323
446
|
|
324
|
-
|
325
|
-
|
326
|
-
|
447
|
+
[.source]
|
448
|
+
I am a generic paragraph
|
449
|
+
INPUT
|
327
450
|
expect(File.read("test.err")).to include "term reference not in expected format"
|
328
|
-
end
|
451
|
+
end
|
329
452
|
|
330
|
-
it "warns that figure does not have title" do
|
331
|
-
|
332
|
-
|
333
|
-
#{VALIDATING_BLANK_HDR}
|
453
|
+
it "warns that figure does not have title" do
|
454
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
455
|
+
#{VALIDATING_BLANK_HDR}
|
334
456
|
|
335
|
-
|
336
|
-
|
457
|
+
image::spec/examples/rice_images/rice_image1.png[]
|
458
|
+
INPUT
|
337
459
|
expect(File.read("test.err")).to include "Figure should have title"
|
338
|
-
end
|
460
|
+
end
|
339
461
|
|
340
|
-
it "warns that callouts do not match annotations" do
|
341
|
-
|
342
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
462
|
+
it "warns that callouts do not match annotations" do
|
463
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
343
464
|
#{VALIDATING_BLANK_HDR}
|
344
465
|
[source,ruby]
|
345
466
|
--
|
@@ -350,902 +471,1085 @@ it "warns that callouts do not match annotations" do
|
|
350
471
|
--
|
351
472
|
<1> This is one callout
|
352
473
|
<2> This is another callout
|
353
|
-
|
474
|
+
INPUT
|
354
475
|
expect(File.read("test.err")).to include "mismatch of callouts and annotations"
|
355
|
-
end
|
476
|
+
end
|
356
477
|
|
357
|
-
it "warns that term source is not a real reference" do
|
358
|
-
|
359
|
-
|
360
|
-
#{VALIDATING_BLANK_HDR}
|
478
|
+
it "warns that term source is not a real reference" do
|
479
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
480
|
+
#{VALIDATING_BLANK_HDR}
|
361
481
|
|
362
|
-
|
363
|
-
|
364
|
-
|
482
|
+
[.source]
|
483
|
+
<<iso123>>
|
484
|
+
INPUT
|
365
485
|
expect(File.read("test.err")).to include "iso123 does not have a corresponding anchor ID in the bibliography"
|
366
|
-
end
|
486
|
+
end
|
367
487
|
|
368
|
-
it "warns that undated reference has locality" do
|
369
|
-
|
370
|
-
|
371
|
-
#{VALIDATING_BLANK_HDR}
|
488
|
+
it "warns that undated reference has locality" do
|
489
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
490
|
+
#{VALIDATING_BLANK_HDR}
|
372
491
|
|
373
|
-
|
374
|
-
|
492
|
+
== Scope
|
493
|
+
<<iso123,clause=1>>
|
375
494
|
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
495
|
+
[bibliography]
|
496
|
+
== Normative References
|
497
|
+
* [[[iso123,ISO 123]]] _Standard_
|
498
|
+
INPUT
|
380
499
|
expect(File.read("test.err")).to include "undated reference ISO 123 should not contain specific elements"
|
381
|
-
end
|
500
|
+
end
|
382
501
|
|
383
|
-
it "do not warn that undated reference which is a bibliographic reference has locality" do
|
384
|
-
|
385
|
-
|
386
|
-
#{VALIDATING_BLANK_HDR}
|
502
|
+
it "do not warn that undated reference which is a bibliographic reference has locality" do
|
503
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
504
|
+
#{VALIDATING_BLANK_HDR}
|
387
505
|
|
388
|
-
|
389
|
-
|
506
|
+
== Scope
|
507
|
+
<<iso123,clause=1>>
|
390
508
|
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
509
|
+
[bibliography]
|
510
|
+
== Bibliography
|
511
|
+
* [[[iso123,1]]] _Standard_
|
512
|
+
INPUT
|
395
513
|
expect(File.read("test.err")).not_to include "undated reference [1] should not contain specific elements"
|
396
|
-
end
|
514
|
+
end
|
397
515
|
|
398
|
-
it "do not warn that undated IEV reference has locality" do
|
399
|
-
|
400
|
-
|
401
|
-
#{VALIDATING_BLANK_HDR}
|
516
|
+
it "do not warn that undated IEV reference has locality" do
|
517
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
518
|
+
#{VALIDATING_BLANK_HDR}
|
402
519
|
|
403
|
-
|
404
|
-
|
520
|
+
== Scope
|
521
|
+
<<iev,clause=1>>
|
405
522
|
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
523
|
+
[bibliography]
|
524
|
+
== Normative References
|
525
|
+
* [[[iev,IEV]]] _Standard_
|
526
|
+
INPUT
|
410
527
|
expect(File.read("test.err")).not_to include "undated reference IEV should not contain specific elements"
|
411
|
-
end
|
528
|
+
end
|
412
529
|
|
413
|
-
it "do not warn that in print has locality" do
|
414
|
-
|
415
|
-
|
416
|
-
#{VALIDATING_BLANK_HDR}
|
530
|
+
it "do not warn that in print has locality" do
|
531
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
532
|
+
#{VALIDATING_BLANK_HDR}
|
417
533
|
|
418
|
-
|
419
|
-
|
534
|
+
== Scope
|
535
|
+
<<iev,clause=1>>
|
420
536
|
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
537
|
+
[bibliography]
|
538
|
+
== Normative References
|
539
|
+
* [[[iev,ISO 123:--]]] _Standard_
|
540
|
+
INPUT
|
425
541
|
expect(File.read("test.err")).not_to include "undated reference ISO 123 should not contain specific elements"
|
426
|
-
end
|
542
|
+
end
|
427
543
|
|
428
|
-
it "warns of Non-reference in bibliography" do
|
429
|
-
|
430
|
-
|
431
|
-
#{VALIDATING_BLANK_HDR}
|
544
|
+
it "warns of Non-reference in bibliography" do
|
545
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
546
|
+
#{VALIDATING_BLANK_HDR}
|
432
547
|
|
433
|
-
|
434
|
-
|
435
|
-
|
548
|
+
== Normative References
|
549
|
+
* I am not a reference
|
550
|
+
INPUT
|
436
551
|
expect(File.read("test.err")).to include "no anchor on reference"
|
437
|
-
end
|
552
|
+
end
|
438
553
|
|
439
|
-
it "warns of Non-ISO reference in Normative References" do
|
440
|
-
|
441
|
-
|
442
|
-
#{VALIDATING_BLANK_HDR}
|
554
|
+
it "warns of Non-ISO reference in Normative References" do
|
555
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
556
|
+
#{VALIDATING_BLANK_HDR}
|
443
557
|
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
558
|
+
[bibliography]
|
559
|
+
== Normative References
|
560
|
+
* [[[XYZ,IESO 121]]] _Standard_
|
561
|
+
INPUT
|
448
562
|
expect(File.read("test.err")).to include "non-ISO/IEC reference not expected as normative"
|
449
|
-
end
|
563
|
+
end
|
450
564
|
|
451
|
-
it "warns that Scope contains subclauses" do
|
452
|
-
|
453
|
-
|
454
|
-
#{VALIDATING_BLANK_HDR}
|
565
|
+
it "warns that Scope contains subclauses" do
|
566
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
567
|
+
#{VALIDATING_BLANK_HDR}
|
455
568
|
|
456
|
-
|
569
|
+
== Scope
|
457
570
|
|
458
|
-
|
459
|
-
|
571
|
+
=== Scope subclause
|
572
|
+
INPUT
|
460
573
|
expect(File.read("test.err")).to include "Scope contains subclauses: should be succinct"
|
461
|
-
end
|
462
|
-
|
574
|
+
end
|
463
575
|
|
464
|
-
it "warns that Table should have title" do
|
465
|
-
|
466
|
-
|
467
|
-
#{VALIDATING_BLANK_HDR}
|
576
|
+
it "warns that Table should have title" do
|
577
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
578
|
+
#{VALIDATING_BLANK_HDR}
|
468
579
|
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
580
|
+
|===
|
581
|
+
|a |b |c
|
582
|
+
|===
|
583
|
+
INPUT
|
473
584
|
expect(File.read("test.err")).to include "Table should have title"
|
474
|
-
end
|
585
|
+
end
|
475
586
|
|
476
|
-
it "gives Style warning if number not broken up in threes" do
|
477
|
-
|
478
|
-
|
479
|
-
#{VALIDATING_BLANK_HDR}
|
587
|
+
it "gives Style warning if number not broken up in threes" do
|
588
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
589
|
+
#{VALIDATING_BLANK_HDR}
|
480
590
|
|
481
|
-
|
482
|
-
|
483
|
-
|
591
|
+
== Clause
|
592
|
+
12121
|
593
|
+
INPUT
|
484
594
|
expect(File.read("test.err")).to include "number not broken up in threes"
|
485
|
-
end
|
595
|
+
end
|
486
596
|
|
487
|
-
it "gives No style warning if number not broken up in threes is ISO reference" do
|
488
|
-
|
489
|
-
|
490
|
-
#{VALIDATING_BLANK_HDR}
|
597
|
+
it "gives No style warning if number not broken up in threes is ISO reference" do
|
598
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
599
|
+
#{VALIDATING_BLANK_HDR}
|
491
600
|
|
492
|
-
|
493
|
-
|
494
|
-
|
601
|
+
== Clause
|
602
|
+
ISO 12121
|
603
|
+
INPUT
|
495
604
|
expect(File.read("test.err")).not_to include "number not broken up in threes"
|
496
|
-
end
|
605
|
+
end
|
497
606
|
|
498
|
-
it "Style warning if decimal point" do
|
499
|
-
|
500
|
-
|
501
|
-
#{VALIDATING_BLANK_HDR}
|
607
|
+
it "Style warning if decimal point" do
|
608
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
609
|
+
#{VALIDATING_BLANK_HDR}
|
502
610
|
|
503
|
-
|
504
|
-
|
505
|
-
|
611
|
+
== Clause
|
612
|
+
8.1
|
613
|
+
INPUT
|
506
614
|
expect(File.read("test.err")).to include "possible decimal point"
|
507
|
-
end
|
615
|
+
end
|
508
616
|
|
509
|
-
it "Style warning if billion used" do
|
510
|
-
|
511
|
-
|
512
|
-
#{VALIDATING_BLANK_HDR}
|
617
|
+
it "Style warning if billion used" do
|
618
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
619
|
+
#{VALIDATING_BLANK_HDR}
|
513
620
|
|
514
|
-
|
515
|
-
|
516
|
-
|
621
|
+
== Clause
|
622
|
+
"Billions" are a term of art.
|
623
|
+
INPUT
|
517
624
|
expect(File.read("test.err")).to include "ambiguous number"
|
518
|
-
end
|
625
|
+
end
|
519
626
|
|
520
|
-
it "Style warning if no space before percent sign" do
|
521
|
-
|
522
|
-
|
523
|
-
#{VALIDATING_BLANK_HDR}
|
627
|
+
it "Style warning if no space before percent sign" do
|
628
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
629
|
+
#{VALIDATING_BLANK_HDR}
|
524
630
|
|
525
|
-
|
526
|
-
|
527
|
-
|
631
|
+
== Clause
|
632
|
+
95%
|
633
|
+
INPUT
|
528
634
|
expect(File.read("test.err")).to include "no space before percent sign"
|
529
|
-
end
|
635
|
+
end
|
530
636
|
|
531
|
-
it "Style warning if unbracketed tolerance before percent sign" do
|
532
|
-
|
533
|
-
|
534
|
-
#{VALIDATING_BLANK_HDR}
|
637
|
+
it "Style warning if unbracketed tolerance before percent sign" do
|
638
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
639
|
+
#{VALIDATING_BLANK_HDR}
|
535
640
|
|
536
|
-
|
537
|
-
|
538
|
-
|
641
|
+
== Clause
|
642
|
+
95 ± 5 %
|
643
|
+
INPUT
|
539
644
|
expect(File.read("test.err")).to include "unbracketed tolerance before percent sign"
|
540
|
-
end
|
645
|
+
end
|
541
646
|
|
542
|
-
it "Style warning if dots in abbreviation" do
|
543
|
-
|
544
|
-
|
545
|
-
#{VALIDATING_BLANK_HDR}
|
647
|
+
it "Style warning if dots in abbreviation" do
|
648
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
649
|
+
#{VALIDATING_BLANK_HDR}
|
546
650
|
|
547
|
-
|
548
|
-
|
549
|
-
|
651
|
+
== Clause
|
652
|
+
r.p.m.
|
653
|
+
INPUT
|
550
654
|
expect(File.read("test.err")).to include "no dots in abbreviation"
|
551
|
-
end
|
655
|
+
end
|
552
656
|
|
553
|
-
it "No Style warning if dots in abbreviation are e.g." do
|
554
|
-
|
555
|
-
|
556
|
-
#{VALIDATING_BLANK_HDR}
|
657
|
+
it "No Style warning if dots in abbreviation are e.g." do
|
658
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
659
|
+
#{VALIDATING_BLANK_HDR}
|
557
660
|
|
558
|
-
|
559
|
-
|
560
|
-
|
661
|
+
== Clause
|
662
|
+
e.g. 5
|
663
|
+
INPUT
|
561
664
|
expect(File.read("test.err")).not_to include "no dots in abbreviation"
|
562
|
-
end
|
665
|
+
end
|
563
666
|
|
564
|
-
it "Style warning if ppm used" do
|
565
|
-
|
566
|
-
|
567
|
-
#{VALIDATING_BLANK_HDR}
|
667
|
+
it "Style warning if ppm used" do
|
668
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
669
|
+
#{VALIDATING_BLANK_HDR}
|
568
670
|
|
569
|
-
|
570
|
-
|
571
|
-
|
671
|
+
== Clause
|
672
|
+
5 ppm
|
673
|
+
INPUT
|
572
674
|
expect(File.read("test.err")).to include "language-specific abbreviation"
|
573
|
-
end
|
675
|
+
end
|
574
676
|
|
575
|
-
it "Style warning if space between number and degree" do
|
576
|
-
|
577
|
-
|
578
|
-
#{VALIDATING_BLANK_HDR}
|
677
|
+
it "Style warning if space between number and degree" do
|
678
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
679
|
+
#{VALIDATING_BLANK_HDR}
|
579
680
|
|
580
|
-
|
581
|
-
|
582
|
-
|
681
|
+
== Clause
|
682
|
+
5 °
|
683
|
+
INPUT
|
583
684
|
expect(File.read("test.err")).to include "space between number and degrees/minutes/seconds"
|
584
|
-
end
|
685
|
+
end
|
585
686
|
|
586
|
-
it "Style warning if no space between number and SI unit" do
|
587
|
-
|
588
|
-
|
589
|
-
#{VALIDATING_BLANK_HDR}
|
687
|
+
it "Style warning if no space between number and SI unit" do
|
688
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
689
|
+
#{VALIDATING_BLANK_HDR}
|
590
690
|
|
591
|
-
|
592
|
-
|
593
|
-
|
691
|
+
== Clause
|
692
|
+
A measurement of 5Bq was taken.
|
693
|
+
INPUT
|
594
694
|
expect(File.read("test.err")).to include "no space between number and SI unit"
|
595
|
-
end
|
695
|
+
end
|
596
696
|
|
597
|
-
it "Style warning if mins used" do
|
598
|
-
|
599
|
-
|
600
|
-
#{VALIDATING_BLANK_HDR}
|
697
|
+
it "Style warning if mins used" do
|
698
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
699
|
+
#{VALIDATING_BLANK_HDR}
|
601
700
|
|
602
|
-
|
603
|
-
|
604
|
-
|
701
|
+
== Clause
|
702
|
+
5 mins
|
703
|
+
INPUT
|
605
704
|
expect(File.read("test.err")).to include "non-standard unit"
|
606
|
-
end
|
705
|
+
end
|
607
706
|
|
608
|
-
# can't test: our asciidoc template won't allow this to be generated
|
609
|
-
# it "Style warning if foreword contains subclauses" do
|
610
|
-
# expect { Asciidoctor.convert(<<~"INPUT",
|
707
|
+
# can't test: our asciidoc template won't allow this to be generated
|
708
|
+
# it "Style warning if foreword contains subclauses" do
|
709
|
+
# expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }
|
710
|
+
# .to output(%r{non-standard unit}).to_stderr
|
611
711
|
# #{VALIDATING_BLANK_HDR}
|
612
|
-
#
|
712
|
+
#
|
613
713
|
# INPUT
|
614
|
-
# end
|
615
|
-
|
616
|
-
# can't test: we strip out any such content from Normative references preemptively
|
617
|
-
#it "Style warning if Normative References contains subclauses" do
|
618
|
-
#expect { Asciidoctor.convert(<<~"INPUT",
|
619
|
-
|
620
|
-
#
|
621
|
-
#
|
714
|
+
# end
|
715
|
+
|
716
|
+
# can't test: we strip out any such content from Normative references preemptively
|
717
|
+
# it "Style warning if Normative References contains subclauses" do
|
718
|
+
# expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }
|
719
|
+
# .to output(%r{normative references contains subclauses}).to_stderr
|
720
|
+
# #{VALIDATING_BLANK_HDR}
|
721
|
+
#
|
722
|
+
# [bibliography]
|
622
723
|
#== Normative References
|
623
724
|
#
|
624
725
|
#=== Subsection
|
625
|
-
#INPUT
|
626
|
-
#end
|
726
|
+
# INPUT
|
727
|
+
# end
|
627
728
|
|
628
|
-
it "Style warning if two Symbols and Abbreviated Terms sections" do
|
629
|
-
|
630
|
-
|
631
|
-
#{VALIDATING_BLANK_HDR}
|
729
|
+
it "Style warning if two Symbols and Abbreviated Terms sections" do
|
730
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
731
|
+
#{VALIDATING_BLANK_HDR}
|
632
732
|
|
633
|
-
|
733
|
+
== Terms and Abbreviations
|
634
734
|
|
635
|
-
|
735
|
+
=== Symbols and Abbreviated Terms
|
636
736
|
|
637
|
-
|
638
|
-
|
737
|
+
== Symbols and Abbreviated Terms
|
738
|
+
INPUT
|
639
739
|
expect(File.read("test.err")).to include "Only one Symbols and Abbreviated Terms section in the standard"
|
640
|
-
end
|
740
|
+
end
|
641
741
|
|
642
|
-
it "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
|
643
|
-
|
644
|
-
|
645
|
-
#{VALIDATING_BLANK_HDR}
|
742
|
+
it "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
|
743
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
744
|
+
#{VALIDATING_BLANK_HDR}
|
646
745
|
|
647
|
-
|
746
|
+
== Symbols and Abbreviated Terms
|
648
747
|
|
649
|
-
|
650
|
-
|
748
|
+
Paragraph
|
749
|
+
INPUT
|
651
750
|
expect(File.read("test.err")).to include "Symbols and Abbreviated Terms can only contain a definition list"
|
652
|
-
end
|
751
|
+
end
|
653
752
|
|
654
|
-
it "Warning if missing foreword" do
|
655
|
-
|
656
|
-
|
657
|
-
#{VALIDATING_BLANK_HDR}
|
753
|
+
it "Warning if missing foreword" do
|
754
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
755
|
+
#{VALIDATING_BLANK_HDR}
|
658
756
|
|
659
|
-
|
757
|
+
== Symbols and Abbreviated Terms
|
660
758
|
|
661
|
-
|
662
|
-
|
759
|
+
Paragraph
|
760
|
+
INPUT
|
663
761
|
expect(File.read("test.err")).to include "Initial section must be (content) Foreword"
|
664
|
-
end
|
665
762
|
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
763
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
764
|
+
= Document title
|
765
|
+
Author
|
766
|
+
:docfile: test.adoc
|
767
|
+
:nodoc:
|
768
|
+
:no-isobib:
|
769
|
+
:doctype: amendment
|
770
|
+
|
771
|
+
== Symbols and Abbreviated Terms
|
772
|
+
|
773
|
+
Paragraph
|
774
|
+
INPUT
|
775
|
+
expect(File.read("test.err")).not_to include "Initial section must be (content) Foreword"
|
776
|
+
end
|
777
|
+
|
778
|
+
it "Warning if do not start with scope or introduction" do
|
779
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
780
|
+
#{VALIDATING_BLANK_HDR}
|
781
|
+
Foreword
|
671
782
|
|
672
|
-
|
783
|
+
== Symbols and Abbreviated Terms
|
673
784
|
|
674
|
-
|
675
|
-
|
785
|
+
Paragraph
|
786
|
+
INPUT
|
676
787
|
expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
|
677
|
-
end
|
678
788
|
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
789
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
790
|
+
= Document title
|
791
|
+
Author
|
792
|
+
:docfile: test.adoc
|
793
|
+
:nodoc:
|
794
|
+
:no-isobib:
|
795
|
+
:doctype: amendment
|
683
796
|
|
684
|
-
|
685
|
-
Foreword
|
797
|
+
Foreword
|
686
798
|
|
687
|
-
|
799
|
+
== Symbols and Abbreviated Terms
|
688
800
|
|
689
|
-
|
801
|
+
Paragraph
|
802
|
+
INPUT
|
803
|
+
expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
|
804
|
+
end
|
690
805
|
|
691
|
-
|
692
|
-
|
806
|
+
it "Warning if introduction not followed by scope" do
|
807
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
808
|
+
#{VALIDATING_BLANK_HDR}
|
809
|
+
|
810
|
+
.Foreword
|
811
|
+
Foreword
|
812
|
+
|
813
|
+
== Introduction
|
814
|
+
|
815
|
+
== Symbols and Abbreviated Terms
|
816
|
+
|
817
|
+
Paragraph
|
818
|
+
INPUT
|
693
819
|
expect(File.read("test.err")).to include "Prefatory material must be followed by (clause) Scope"
|
694
|
-
end
|
695
820
|
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
821
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
822
|
+
= Document title
|
823
|
+
Author
|
824
|
+
:docfile: test.adoc
|
825
|
+
:nodoc:
|
826
|
+
:no-isobib:
|
827
|
+
:doctype: amendment
|
828
|
+
|
829
|
+
.Foreword
|
830
|
+
Foreword
|
700
831
|
|
701
|
-
|
702
|
-
|
832
|
+
== Introduction
|
833
|
+
|
834
|
+
== Symbols and Abbreviated Terms
|
835
|
+
|
836
|
+
Paragraph
|
837
|
+
INPUT
|
838
|
+
expect(File.read("test.err")).not_to include "Prefatory material must be followed by (clause) Scope"
|
839
|
+
end
|
840
|
+
|
841
|
+
it "Warning if normative references not followed by terms and definitions" do
|
842
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
843
|
+
#{VALIDATING_BLANK_HDR}
|
703
844
|
|
704
|
-
|
845
|
+
.Foreword
|
846
|
+
Foreword
|
705
847
|
|
706
|
-
|
707
|
-
== Normative References
|
848
|
+
== Scope
|
708
849
|
|
709
|
-
|
850
|
+
[bibliography]
|
851
|
+
== Normative References
|
710
852
|
|
711
|
-
|
712
|
-
|
853
|
+
== Symbols and Abbreviated Terms
|
854
|
+
|
855
|
+
Paragraph
|
856
|
+
INPUT
|
713
857
|
expect(File.read("test.err")).to include "Normative References must be followed by Terms and Definitions"
|
714
|
-
end
|
715
858
|
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
859
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
860
|
+
= Document title
|
861
|
+
Author
|
862
|
+
:docfile: test.adoc
|
863
|
+
:nodoc:
|
864
|
+
:no-isobib:
|
865
|
+
:doctype: amendment
|
866
|
+
|
867
|
+
.Foreword
|
868
|
+
Foreword
|
869
|
+
|
870
|
+
== Scope
|
871
|
+
|
872
|
+
[bibliography]
|
873
|
+
== Normative References
|
874
|
+
|
875
|
+
== Symbols and Abbreviated Terms
|
876
|
+
|
877
|
+
Paragraph
|
878
|
+
INPUT
|
879
|
+
expect(File.read("test.err")).not_to include "Normative References must be followed by Terms and Definitions"
|
880
|
+
end
|
881
|
+
|
882
|
+
it "Warning if there are no clauses in the document" do
|
883
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
884
|
+
#{VALIDATING_BLANK_HDR}
|
720
885
|
|
721
|
-
|
722
|
-
|
886
|
+
.Foreword
|
887
|
+
Foreword
|
723
888
|
|
724
|
-
|
889
|
+
== Scope
|
725
890
|
|
726
|
-
|
727
|
-
|
891
|
+
[bibliography]
|
892
|
+
== Normative References
|
728
893
|
|
729
|
-
|
894
|
+
== Terms and Definitions
|
730
895
|
|
731
|
-
|
896
|
+
== Symbols and Abbreviated Terms
|
732
897
|
|
733
|
-
|
898
|
+
INPUT
|
734
899
|
expect(File.read("test.err")).to include "Document must contain at least one clause"
|
735
|
-
end
|
736
900
|
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
901
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
902
|
+
= Document title
|
903
|
+
Author
|
904
|
+
:docfile: test.adoc
|
905
|
+
:nodoc:
|
906
|
+
:no-isobib:
|
907
|
+
:doctype: amendment
|
908
|
+
|
909
|
+
.Foreword
|
910
|
+
Foreword
|
911
|
+
|
912
|
+
== Scope
|
741
913
|
|
742
|
-
|
743
|
-
|
914
|
+
[bibliography]
|
915
|
+
== Normative References
|
744
916
|
|
745
|
-
|
917
|
+
== Terms and Definitions
|
746
918
|
|
747
|
-
|
748
|
-
== Normative References
|
919
|
+
== Symbols and Abbreviated Terms
|
749
920
|
|
750
|
-
|
921
|
+
INPUT
|
922
|
+
expect(File.read("test.err")).not_to include "Document must contain at least one clause"
|
923
|
+
end
|
924
|
+
|
925
|
+
it "Warning if scope occurs after Terms and Definitions" do
|
926
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
927
|
+
#{VALIDATING_BLANK_HDR}
|
751
928
|
|
752
|
-
|
929
|
+
.Foreword
|
930
|
+
Foreword
|
753
931
|
|
754
|
-
|
932
|
+
== Scope
|
755
933
|
|
756
|
-
|
934
|
+
[bibliography]
|
935
|
+
== Normative References
|
936
|
+
|
937
|
+
== Terms and Definitions
|
938
|
+
|
939
|
+
== Clause
|
940
|
+
|
941
|
+
== Scope
|
942
|
+
|
943
|
+
INPUT
|
757
944
|
expect(File.read("test.err")).to include "Scope must occur before Terms and Definitions"
|
758
|
-
end
|
759
945
|
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
946
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
947
|
+
= Document title
|
948
|
+
Author
|
949
|
+
:docfile: test.adoc
|
950
|
+
:nodoc:
|
951
|
+
:no-isobib:
|
952
|
+
:doctype: amendment
|
953
|
+
|
954
|
+
.Foreword
|
955
|
+
Foreword
|
956
|
+
|
957
|
+
== Scope
|
958
|
+
|
959
|
+
[bibliography]
|
960
|
+
== Normative References
|
961
|
+
|
962
|
+
== Terms and Definitions
|
963
|
+
|
964
|
+
== Clause
|
965
|
+
|
966
|
+
== Scope
|
967
|
+
|
968
|
+
INPUT
|
969
|
+
expect(File.read("test.err")).not_to include "Scope must occur before Terms and Definitions"
|
970
|
+
end
|
971
|
+
|
972
|
+
it "Warning if Symbols and Abbreviated Terms does not occur immediately after Terms and Definitions" do
|
973
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
974
|
+
#{VALIDATING_BLANK_HDR}
|
764
975
|
|
765
|
-
|
766
|
-
|
976
|
+
.Foreword
|
977
|
+
Foreword
|
767
978
|
|
768
|
-
|
979
|
+
== Scope
|
769
980
|
|
770
|
-
|
771
|
-
|
981
|
+
[bibliography]
|
982
|
+
== Normative References
|
772
983
|
|
773
|
-
|
984
|
+
== Terms and Definitions
|
774
985
|
|
775
|
-
|
986
|
+
== Clause
|
776
987
|
|
777
|
-
|
988
|
+
== Symbols and Abbreviated Terms
|
778
989
|
|
779
|
-
|
990
|
+
INPUT
|
780
991
|
expect(File.read("test.err")).to include "Only annexes and references can follow clauses"
|
781
|
-
end
|
782
992
|
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
993
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
994
|
+
= Document title
|
995
|
+
Author
|
996
|
+
:docfile: test.adoc
|
997
|
+
:nodoc:
|
998
|
+
:no-isobib:
|
999
|
+
:doctype: amendment
|
1000
|
+
|
1001
|
+
|
1002
|
+
.Foreword
|
1003
|
+
Foreword
|
1004
|
+
|
1005
|
+
== Scope
|
1006
|
+
|
1007
|
+
[bibliography]
|
1008
|
+
== Normative References
|
1009
|
+
|
1010
|
+
== Terms and Definitions
|
787
1011
|
|
788
|
-
|
789
|
-
|
1012
|
+
== Clause
|
1013
|
+
|
1014
|
+
== Symbols and Abbreviated Terms
|
1015
|
+
|
1016
|
+
INPUT
|
1017
|
+
expect(File.read("test.err")).not_to include "Only annexes and references can follow clauses"
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
it "Warning if no normative references" do
|
1021
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1022
|
+
#{VALIDATING_BLANK_HDR}
|
790
1023
|
|
791
|
-
|
1024
|
+
.Foreword
|
1025
|
+
Foreword
|
792
1026
|
|
793
|
-
|
1027
|
+
== Scope
|
794
1028
|
|
795
|
-
|
1029
|
+
== Terms and Definitions
|
796
1030
|
|
797
|
-
|
798
|
-
== Appendix A
|
1031
|
+
== Clause
|
799
1032
|
|
800
|
-
|
801
|
-
|
1033
|
+
[appendix]
|
1034
|
+
== Appendix A
|
802
1035
|
|
803
|
-
|
804
|
-
|
1036
|
+
[appendix]
|
1037
|
+
== Appendix B
|
805
1038
|
|
806
|
-
|
1039
|
+
[appendix]
|
1040
|
+
== Appendix C
|
1041
|
+
|
1042
|
+
INPUT
|
807
1043
|
expect(File.read("test.err")).to include "Document must include (references) Normative References"
|
808
|
-
end
|
809
1044
|
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
1045
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1046
|
+
= Document title
|
1047
|
+
Author
|
1048
|
+
:docfile: test.adoc
|
1049
|
+
:nodoc:
|
1050
|
+
:no-isobib:
|
1051
|
+
:doctype: amendment
|
1052
|
+
|
1053
|
+
.Foreword
|
1054
|
+
Foreword
|
1055
|
+
|
1056
|
+
== Scope
|
1057
|
+
|
1058
|
+
== Terms and Definitions
|
1059
|
+
|
1060
|
+
== Clause
|
1061
|
+
|
1062
|
+
[appendix]
|
1063
|
+
== Appendix A
|
1064
|
+
|
1065
|
+
[appendix]
|
1066
|
+
== Appendix B
|
1067
|
+
|
1068
|
+
[appendix]
|
1069
|
+
== Appendix C
|
1070
|
+
|
1071
|
+
INPUT
|
1072
|
+
expect(File.read("test.err")).not_to include "Document must include (references) Normative References"
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
it "Warning if final section is not named Bibliography" do
|
1076
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1077
|
+
#{VALIDATING_BLANK_HDR}
|
814
1078
|
|
815
|
-
|
816
|
-
|
1079
|
+
.Foreword
|
1080
|
+
Foreword
|
817
1081
|
|
818
|
-
|
1082
|
+
== Scope
|
819
1083
|
|
820
|
-
|
821
|
-
|
1084
|
+
[bibliography]
|
1085
|
+
== Normative References
|
822
1086
|
|
823
|
-
|
1087
|
+
== Terms and Definitions
|
824
1088
|
|
825
|
-
|
1089
|
+
== Clause
|
826
1090
|
|
827
|
-
|
828
|
-
|
1091
|
+
[appendix]
|
1092
|
+
== Appendix A
|
829
1093
|
|
830
|
-
|
831
|
-
|
1094
|
+
[appendix]
|
1095
|
+
== Appendix B
|
832
1096
|
|
833
|
-
|
834
|
-
|
1097
|
+
[bibliography]
|
1098
|
+
== Bibliography
|
835
1099
|
|
836
|
-
|
837
|
-
|
1100
|
+
[bibliography]
|
1101
|
+
== Appendix C
|
838
1102
|
|
839
|
-
|
1103
|
+
INPUT
|
840
1104
|
expect(File.read("test.err")).to include "There are sections after the final Bibliography"
|
841
|
-
end
|
842
1105
|
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
1106
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1107
|
+
= Document title
|
1108
|
+
Author
|
1109
|
+
:docfile: test.adoc
|
1110
|
+
:nodoc:
|
1111
|
+
:no-isobib:
|
1112
|
+
:doctype: amendment
|
1113
|
+
|
1114
|
+
.Foreword
|
1115
|
+
Foreword
|
1116
|
+
|
1117
|
+
== Scope
|
847
1118
|
|
848
|
-
|
849
|
-
|
1119
|
+
[bibliography]
|
1120
|
+
== Normative References
|
850
1121
|
|
851
|
-
|
1122
|
+
== Terms and Definitions
|
852
1123
|
|
853
|
-
|
854
|
-
== Normative References
|
1124
|
+
== Clause
|
855
1125
|
|
856
|
-
|
1126
|
+
[appendix]
|
1127
|
+
== Appendix A
|
857
1128
|
|
858
|
-
|
1129
|
+
[appendix]
|
1130
|
+
== Appendix B
|
859
1131
|
|
860
|
-
|
861
|
-
|
1132
|
+
[bibliography]
|
1133
|
+
== Bibliography
|
1134
|
+
|
1135
|
+
[bibliography]
|
1136
|
+
== Appendix C
|
1137
|
+
|
1138
|
+
INPUT
|
1139
|
+
expect(File.read("test.err")).not_to include "There are sections after the final Bibliography"
|
1140
|
+
end
|
1141
|
+
|
1142
|
+
it "Warning if final section is not styled Bibliography" do
|
1143
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1144
|
+
#{VALIDATING_BLANK_HDR}
|
862
1145
|
|
863
|
-
|
864
|
-
|
1146
|
+
.Foreword
|
1147
|
+
Foreword
|
865
1148
|
|
866
|
-
|
1149
|
+
== Scope
|
867
1150
|
|
868
|
-
|
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
|
869
1167
|
expect(File.read("test.err")).to include "Section not marked up as [bibliography]"
|
870
|
-
end
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
it "Warning if final section is not styled Bibliography false" do
|
1171
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1172
|
+
= Document title
|
1173
|
+
Author
|
1174
|
+
:docfile: test.adoc
|
1175
|
+
:nodoc:
|
1176
|
+
:no-isobib:
|
1177
|
+
:doctype: amendment
|
1178
|
+
|
1179
|
+
.Foreword
|
1180
|
+
Foreword
|
871
1181
|
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
1182
|
+
== Scope
|
1183
|
+
|
1184
|
+
[bibliography]
|
1185
|
+
== Normative References
|
1186
|
+
|
1187
|
+
== Terms and Definitions
|
1188
|
+
|
1189
|
+
== Clause
|
1190
|
+
|
1191
|
+
[appendix]
|
1192
|
+
== Appendix A
|
1193
|
+
|
1194
|
+
[appendix]
|
1195
|
+
== Appendix B
|
1196
|
+
|
1197
|
+
== Bibliography
|
1198
|
+
|
1199
|
+
INPUT
|
1200
|
+
expect(File.read("test.err")).not_to include "Section not marked up as [bibliography]"
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
it "Warning if English title intro and no French title intro" do
|
1204
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1205
|
+
= Document title
|
1206
|
+
Author
|
1207
|
+
:docfile: test.adoc
|
1208
|
+
:nodoc:
|
1209
|
+
:title-intro-en: Title
|
1210
|
+
:no-isobib:
|
1211
|
+
|
1212
|
+
INPUT
|
883
1213
|
expect(File.read("test.err")).to include "No French Title Intro"
|
884
|
-
end
|
1214
|
+
end
|
885
1215
|
|
886
|
-
it "Warning if French title intro and no English title intro" do
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
:no-isobib:
|
895
|
-
|
896
|
-
INPUT
|
897
|
-
expect(File.read("test.err")).to include "No English Title Intro"
|
898
|
-
end
|
1216
|
+
it "Warning if French title intro and no English title intro" do
|
1217
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1218
|
+
= Document title
|
1219
|
+
Author
|
1220
|
+
:docfile: test.adoc
|
1221
|
+
:nodoc:
|
1222
|
+
:title-intro-fr: Title
|
1223
|
+
:no-isobib:
|
899
1224
|
|
1225
|
+
INPUT
|
1226
|
+
expect(File.read("test.err")).to include "No English Title Intro"
|
1227
|
+
end
|
900
1228
|
|
901
|
-
it "Warning if English title and no French intro" do
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
:no-isobib:
|
1229
|
+
it "Warning if English title and no French intro" do
|
1230
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1231
|
+
= Document title
|
1232
|
+
Author
|
1233
|
+
:docfile: test.adoc
|
1234
|
+
:nodoc:
|
1235
|
+
:title-main-en: Title
|
1236
|
+
:no-isobib:
|
910
1237
|
|
911
|
-
|
1238
|
+
INPUT
|
912
1239
|
expect(File.read("test.err")).to include "No French Title"
|
913
|
-
end
|
1240
|
+
end
|
1241
|
+
|
1242
|
+
it "Warning if French title and no English title" do
|
1243
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1244
|
+
= Document title
|
1245
|
+
Author
|
1246
|
+
:docfile: test.adoc
|
1247
|
+
:nodoc:
|
1248
|
+
:title-main-fr: Title
|
1249
|
+
:no-isobib:
|
914
1250
|
|
915
|
-
|
916
|
-
FileUtils.rm_f "test.err"
|
917
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
918
|
-
= Document title
|
919
|
-
Author
|
920
|
-
:docfile: test.adoc
|
921
|
-
:nodoc:
|
922
|
-
:title-main-fr: Title
|
923
|
-
:no-isobib:
|
924
|
-
|
925
|
-
INPUT
|
1251
|
+
INPUT
|
926
1252
|
expect(File.read("test.err")).to include "No English Title"
|
927
|
-
end
|
1253
|
+
end
|
928
1254
|
|
929
|
-
it "Warning if English title part and no French title part" do
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
INPUT
|
1255
|
+
it "Warning if English title part and no French title part" do
|
1256
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1257
|
+
= Document title
|
1258
|
+
Author
|
1259
|
+
:docfile: test.adoc
|
1260
|
+
:nodoc:
|
1261
|
+
:title-part-en: Title
|
1262
|
+
:no-isobib:
|
1263
|
+
|
1264
|
+
INPUT
|
940
1265
|
expect(File.read("test.err")).to include "No French Title Part"
|
941
|
-
end
|
1266
|
+
end
|
942
1267
|
|
943
|
-
it "Warning if French title part and no English title part" do
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
INPUT
|
1268
|
+
it "Warning if French title part and no English title part" do
|
1269
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1270
|
+
= Document title
|
1271
|
+
Author
|
1272
|
+
:docfile: test.adoc
|
1273
|
+
:nodoc:
|
1274
|
+
:title-part-fr: Title
|
1275
|
+
:no-isobib:
|
1276
|
+
|
1277
|
+
INPUT
|
954
1278
|
expect(File.read("test.err")).to include "No English Title Part"
|
955
|
-
end
|
1279
|
+
end
|
956
1280
|
|
957
|
-
it "Warning if non-IEC document with subpart" do
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
INPUT
|
1281
|
+
it "Warning if non-IEC document with subpart" do
|
1282
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1283
|
+
= Document title
|
1284
|
+
Author
|
1285
|
+
:docfile: test.adoc
|
1286
|
+
:nodoc:
|
1287
|
+
:docnumber: 10
|
1288
|
+
:partnumber: 1-1
|
1289
|
+
:publisher: ISO
|
1290
|
+
:no-isobib:
|
1291
|
+
|
1292
|
+
INPUT
|
970
1293
|
expect(File.read("test.err")).to include "Subpart defined on non-IEC document"
|
971
|
-
end
|
1294
|
+
end
|
972
1295
|
|
973
|
-
it "No warning if joint IEC/non-IEC document with subpart" do
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
INPUT
|
1296
|
+
it "No warning if joint IEC/non-IEC document with subpart" do
|
1297
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1298
|
+
= Document title
|
1299
|
+
Author
|
1300
|
+
:docfile: test.adoc
|
1301
|
+
:nodoc:
|
1302
|
+
:docnumber: 10
|
1303
|
+
:partnumber: 1-1
|
1304
|
+
:publisher: ISO;IEC
|
1305
|
+
:no-isobib:
|
1306
|
+
|
1307
|
+
INPUT
|
986
1308
|
expect(File.read("test.err")).not_to include "Subpart defined on non-IEC document"
|
987
|
-
end
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
it "Warning if main title contains document type" do
|
1312
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1313
|
+
= Document title
|
1314
|
+
Author
|
1315
|
+
:docfile: test.adoc
|
1316
|
+
:nodoc:
|
1317
|
+
:title-main-en: A Technical Specification on Widgets
|
1318
|
+
:no-isobib:
|
988
1319
|
|
989
|
-
|
990
|
-
FileUtils.rm_f "test.err"
|
991
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
992
|
-
= Document title
|
993
|
-
Author
|
994
|
-
:docfile: test.adoc
|
995
|
-
:nodoc:
|
996
|
-
:title-main-en: A Technical Specification on Widgets
|
997
|
-
:no-isobib:
|
998
|
-
|
999
|
-
INPUT
|
1320
|
+
INPUT
|
1000
1321
|
expect(File.read("test.err")).to include "Main Title may name document type"
|
1001
|
-
end
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
it "Warning if intro title contains document type" do
|
1325
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1326
|
+
= Document title
|
1327
|
+
Author
|
1328
|
+
:docfile: test.adoc
|
1329
|
+
:nodoc:
|
1330
|
+
:title-intro-en: A Technical Specification on Widgets
|
1331
|
+
:no-isobib:
|
1002
1332
|
|
1003
|
-
|
1004
|
-
FileUtils.rm_f "test.err"
|
1005
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1006
|
-
= Document title
|
1007
|
-
Author
|
1008
|
-
:docfile: test.adoc
|
1009
|
-
:nodoc:
|
1010
|
-
:title-intro-en: A Technical Specification on Widgets
|
1011
|
-
:no-isobib:
|
1012
|
-
|
1013
|
-
INPUT
|
1333
|
+
INPUT
|
1014
1334
|
expect(File.read("test.err")).to include "Title Intro may name document type"
|
1015
|
-
end
|
1335
|
+
end
|
1016
1336
|
|
1017
|
-
it "Each first-level subclause must have a title" do
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
== Clause
|
1337
|
+
it "Each first-level subclause must have a title" do
|
1338
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1339
|
+
#{VALIDATING_BLANK_HDR}
|
1340
|
+
== Clause
|
1022
1341
|
|
1023
|
-
|
1024
|
-
|
1342
|
+
=== {blank}
|
1343
|
+
INPUT
|
1025
1344
|
expect(File.read("test.err")).to include "each first-level subclause must have a title"
|
1026
|
-
end
|
1345
|
+
end
|
1027
1346
|
|
1028
|
-
it "All subclauses must have a title, or none" do
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
== Clause
|
1347
|
+
it "All subclauses must have a title, or none" do
|
1348
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1349
|
+
#{VALIDATING_BLANK_HDR}
|
1350
|
+
== Clause
|
1033
1351
|
|
1034
|
-
|
1352
|
+
=== Subclause
|
1035
1353
|
|
1036
|
-
|
1354
|
+
==== {blank}
|
1037
1355
|
|
1038
|
-
|
1039
|
-
|
1356
|
+
==== Subsubclause
|
1357
|
+
INPUT
|
1040
1358
|
expect(File.read("test.err")).to include "all subclauses must have a title, or none"
|
1041
|
-
end
|
1359
|
+
end
|
1042
1360
|
|
1043
|
-
it "Warning if subclause is only child of its parent, or none" do
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
== Clause
|
1361
|
+
it "Warning if subclause is only child of its parent, or none" do
|
1362
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1363
|
+
#{VALIDATING_BLANK_HDR}
|
1364
|
+
== Clause
|
1048
1365
|
|
1049
|
-
|
1366
|
+
=== Subclause
|
1050
1367
|
|
1051
|
-
|
1368
|
+
INPUT
|
1052
1369
|
expect(File.read("test.err")).to include "subclause is only child"
|
1053
|
-
end
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
it "Warning if invalid technical committee type" do
|
1373
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1374
|
+
= Document title
|
1375
|
+
Author
|
1376
|
+
:docfile: test.adoc
|
1377
|
+
:nodoc:
|
1378
|
+
:technical-committee-type: X
|
1379
|
+
:no-isobib:
|
1054
1380
|
|
1055
|
-
|
1056
|
-
FileUtils.rm_f "test.err"
|
1057
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1058
|
-
= Document title
|
1059
|
-
Author
|
1060
|
-
:docfile: test.adoc
|
1061
|
-
:nodoc:
|
1062
|
-
:technical-committee-type: X
|
1063
|
-
:no-isobib:
|
1064
|
-
|
1065
|
-
INPUT
|
1381
|
+
INPUT
|
1066
1382
|
expect(File.read("test.err")).to include "invalid technical committee type"
|
1067
|
-
end
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
it "Warning if invalid subcommittee type" do
|
1386
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1387
|
+
= Document title
|
1388
|
+
Author
|
1389
|
+
:docfile: test.adoc
|
1390
|
+
:nodoc:
|
1391
|
+
:subcommittee-type: X
|
1392
|
+
:no-isobib:
|
1068
1393
|
|
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
|
-
:subcommittee-type: X
|
1077
|
-
:no-isobib:
|
1078
|
-
|
1079
|
-
INPUT
|
1394
|
+
INPUT
|
1080
1395
|
expect(File.read("test.err")).to include "invalid subcommittee type"
|
1081
|
-
end
|
1396
|
+
end
|
1397
|
+
|
1398
|
+
it "Warning if invalid subcommittee type" do
|
1399
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1400
|
+
= Document title
|
1401
|
+
Author
|
1402
|
+
:docfile: test.adoc
|
1403
|
+
:nodoc:
|
1404
|
+
:subcommittee-type: X
|
1405
|
+
:no-isobib:
|
1082
1406
|
|
1083
|
-
|
1084
|
-
FileUtils.rm_f "test.err"
|
1085
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1086
|
-
= Document title
|
1087
|
-
Author
|
1088
|
-
:docfile: test.adoc
|
1089
|
-
:nodoc:
|
1090
|
-
:subcommittee-type: X
|
1091
|
-
:no-isobib:
|
1092
|
-
|
1093
|
-
INPUT
|
1407
|
+
INPUT
|
1094
1408
|
expect(File.read("test.err")).to include "invalid subcommittee type"
|
1095
|
-
end
|
1409
|
+
end
|
1096
1410
|
|
1097
|
-
it "Warning if 'see' crossreference points to normative section" do
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
== Terms and Definitions
|
1411
|
+
it "Warning if 'see' crossreference points to normative section" do
|
1412
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1413
|
+
#{VALIDATING_BLANK_HDR}
|
1414
|
+
[[terms]]
|
1415
|
+
== Terms and Definitions
|
1103
1416
|
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1417
|
+
== Clause
|
1418
|
+
See <<terms>>
|
1419
|
+
INPUT
|
1107
1420
|
expect(File.read("test.err")).to include "'see terms' is pointing to a normative section"
|
1108
|
-
end
|
1421
|
+
end
|
1109
1422
|
|
1110
|
-
it "Warning if 'see' reference points to normative reference" do
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
INPUT
|
1423
|
+
it "Warning if 'see' reference points to normative reference" do
|
1424
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1425
|
+
#{VALIDATING_BLANK_HDR}
|
1426
|
+
[bibliography]
|
1427
|
+
== Normative References
|
1428
|
+
* [[[terms,ISO 1]]] _References_
|
1429
|
+
|
1430
|
+
== Clause
|
1431
|
+
See <<terms>>
|
1432
|
+
INPUT
|
1121
1433
|
expect(File.read("test.err")).to include "is pointing to a normative reference"
|
1122
|
-
end
|
1434
|
+
end
|
1123
1435
|
|
1124
|
-
it "Warning if term definition starts with article" do
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
== Terms and Definitions
|
1436
|
+
it "Warning if term definition starts with article" do
|
1437
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1438
|
+
#{VALIDATING_BLANK_HDR}
|
1439
|
+
== Terms and Definitions
|
1129
1440
|
|
1130
|
-
|
1441
|
+
=== Term
|
1131
1442
|
|
1132
|
-
|
1133
|
-
|
1443
|
+
The definition of a term is a part of the specialized vocabulary of a particular field
|
1444
|
+
INPUT
|
1134
1445
|
expect(File.read("test.err")).to include "term definition starts with article"
|
1135
|
-
end
|
1446
|
+
end
|
1136
1447
|
|
1137
|
-
it "Warning if term definition ends with period" do
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
== Terms and Definitions
|
1448
|
+
it "Warning if term definition ends with period" do
|
1449
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1450
|
+
#{VALIDATING_BLANK_HDR}
|
1451
|
+
== Terms and Definitions
|
1142
1452
|
|
1143
|
-
|
1453
|
+
=== Term
|
1144
1454
|
|
1145
|
-
|
1146
|
-
|
1455
|
+
Part of the specialized vocabulary of a particular field.
|
1456
|
+
INPUT
|
1147
1457
|
expect(File.read("test.err")).to include "term definition ends with period"
|
1148
|
-
end
|
1458
|
+
end
|
1149
1459
|
|
1150
|
-
it "validates document against ISO XML schema" do
|
1151
|
-
|
1152
|
-
|
1153
|
-
#{VALIDATING_BLANK_HDR}
|
1460
|
+
it "validates document against ISO XML schema" do
|
1461
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1462
|
+
#{VALIDATING_BLANK_HDR}
|
1154
1463
|
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1464
|
+
[align=mid-air]
|
1465
|
+
Para
|
1466
|
+
INPUT
|
1158
1467
|
expect(File.read("test.err")).to include 'value of attribute "align" is invalid; must be equal to'
|
1159
|
-
end
|
1468
|
+
end
|
1160
1469
|
|
1161
|
-
it "Warn if more than 7 levels of subclause" do
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
:language: fr
|
1470
|
+
it "Warn if more than 7 levels of subclause" do
|
1471
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1472
|
+
= Document title
|
1473
|
+
Author
|
1474
|
+
:docfile: test.adoc
|
1475
|
+
:nodoc:
|
1476
|
+
:no-isobib:
|
1477
|
+
:language: fr
|
1170
1478
|
|
1171
|
-
|
1479
|
+
== Clause
|
1172
1480
|
|
1173
|
-
|
1481
|
+
=== Clause
|
1174
1482
|
|
1175
|
-
|
1483
|
+
==== Clause
|
1176
1484
|
|
1177
|
-
|
1485
|
+
===== Clause
|
1178
1486
|
|
1179
|
-
|
1487
|
+
====== Clause
|
1180
1488
|
|
1181
|
-
|
1182
|
-
|
1489
|
+
[level=6]
|
1490
|
+
====== Clause
|
1183
1491
|
|
1184
|
-
|
1185
|
-
|
1492
|
+
[level=7]
|
1493
|
+
====== Clause
|
1186
1494
|
|
1187
|
-
|
1188
|
-
|
1495
|
+
[level=8]
|
1496
|
+
====== Clause
|
1189
1497
|
|
1190
|
-
|
1498
|
+
INPUT
|
1191
1499
|
expect(File.read("test.err")).to include "Exceeds the maximum clause depth of 7"
|
1192
|
-
end
|
1500
|
+
end
|
1193
1501
|
|
1194
|
-
it "Do not warn if not more than 7 levels of subclause" do
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
:language: fr
|
1502
|
+
it "Do not warn if not more than 7 levels of subclause" do
|
1503
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1504
|
+
= Document title
|
1505
|
+
Author
|
1506
|
+
:docfile: test.adoc
|
1507
|
+
:nodoc:
|
1508
|
+
:no-isobib:
|
1509
|
+
:language: fr
|
1203
1510
|
|
1204
|
-
|
1511
|
+
== Clause
|
1205
1512
|
|
1206
|
-
|
1513
|
+
=== Clause
|
1207
1514
|
|
1208
|
-
|
1515
|
+
==== Clause
|
1209
1516
|
|
1210
|
-
|
1517
|
+
===== Clause
|
1211
1518
|
|
1212
|
-
|
1519
|
+
====== Clause
|
1213
1520
|
|
1214
|
-
|
1215
|
-
|
1521
|
+
[level=6]
|
1522
|
+
====== Clause
|
1216
1523
|
|
1217
|
-
|
1218
|
-
|
1524
|
+
[level=7]
|
1525
|
+
====== Clause
|
1219
1526
|
|
1220
|
-
|
1527
|
+
INPUT
|
1221
1528
|
expect(File.read("test.err")).not_to include "exceeds the maximum clause depth of 7"
|
1222
|
-
end
|
1529
|
+
end
|
1223
1530
|
|
1224
|
-
it "Warn if term citation in Terms & Definitions not preceded with italicised term" do
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
== Terms and Definitions
|
1531
|
+
it "Warn if term citation in Terms & Definitions not preceded with italicised term" do
|
1532
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1533
|
+
#{VALIDATING_BLANK_HDR}
|
1534
|
+
== Terms and Definitions
|
1229
1535
|
|
1230
|
-
|
1231
|
-
|
1536
|
+
[[term]]
|
1537
|
+
=== Term
|
1232
1538
|
|
1233
|
-
|
1234
|
-
|
1539
|
+
The definition of a term (<<term>>) is a part of the specialized vocabulary of a particular field
|
1540
|
+
INPUT
|
1235
1541
|
expect(File.read("test.err")).to include "term citation not preceded with italicised term"
|
1236
|
-
end
|
1237
|
-
|
1238
|
-
it "Warn if an undated reference has no associated footnote" do
|
1239
|
-
FileUtils.rm_f "test.err"
|
1240
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
|
1241
|
-
#{VALIDATING_BLANK_HDR}
|
1242
|
-
|
1243
|
-
[bibliography]
|
1244
|
-
== Bibliography
|
1245
|
-
* [[[ISO8,ISO 8:--]]], _Title_
|
1246
|
-
INPUT
|
1247
|
-
expect(File.read("test.err")).to include "Reference ISO8 does not have an associated footnote indicating unpublished status"
|
1248
|
-
end
|
1542
|
+
end
|
1249
1543
|
|
1544
|
+
it "Warn if an undated reference has no associated footnote" do
|
1545
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
1546
|
+
#{VALIDATING_BLANK_HDR}
|
1250
1547
|
|
1548
|
+
[bibliography]
|
1549
|
+
== Bibliography
|
1550
|
+
* [[[ISO8,ISO 8:--]]], _Title_
|
1551
|
+
INPUT
|
1552
|
+
expect(File.read("test.err")).to include \
|
1553
|
+
"Reference ISO8 does not have an associated footnote indicating unpublished status"
|
1554
|
+
end
|
1251
1555
|
end
|