metanorma-standoc 1.9.2 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/standoc/biblio.rng +1 -0
- data/lib/asciidoctor/standoc/cleanup.rb +33 -13
- data/lib/asciidoctor/standoc/cleanup_section.rb +84 -80
- data/lib/asciidoctor/standoc/front.rb +1 -1
- data/lib/asciidoctor/standoc/isodoc.rng +1 -3
- data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +31 -16
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +1 -1
- data/spec/asciidoctor/base_spec.rb +11 -11
- data/spec/asciidoctor/blocks_spec.rb +0 -2
- data/spec/asciidoctor/cleanup_sections_spec.rb +14 -14
- data/spec/asciidoctor/cleanup_spec.rb +60 -60
- data/spec/asciidoctor/inline_spec.rb +14 -14
- data/spec/asciidoctor/lists_spec.rb +3 -3
- data/spec/asciidoctor/macros_plantuml_spec.rb +8 -8
- data/spec/asciidoctor/macros_spec.rb +13 -13
- data/spec/asciidoctor/refs_dl_spec.rb +4 -4
- data/spec/asciidoctor/refs_spec.rb +18 -18
- data/spec/asciidoctor/section_spec.rb +58 -22
- data/spec/asciidoctor/table_spec.rb +6 -6
- data/spec/asciidoctor/validate_spec.rb +21 -21
- data/spec/spec_helper.rb +2 -0
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +45 -45
- data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123_1.yml +23 -23
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +31 -31
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_124.yml +11 -11
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
- metadata +4 -8
- data/lib/liquid/custom_blocks/key_iterator.rb +0 -21
- data/lib/liquid/custom_blocks/with_json_nested_context.rb +0 -18
- data/lib/liquid/custom_blocks/with_yaml_nested_context.rb +0 -19
- data/lib/liquid/custom_filters/values.rb +0 -7
@@ -198,7 +198,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
198
198
|
</indexsect>
|
199
199
|
</standard-document>
|
200
200
|
OUTPUT
|
201
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
201
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
202
202
|
.to be_equivalent_to xmlpp(output)
|
203
203
|
end
|
204
204
|
|
@@ -339,7 +339,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
339
339
|
</bibliography>
|
340
340
|
</standard-document>
|
341
341
|
OUTPUT
|
342
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
342
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
343
343
|
.to be_equivalent_to xmlpp(output)
|
344
344
|
end
|
345
345
|
|
@@ -544,7 +544,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
544
544
|
</clause></bibliography>
|
545
545
|
</standard-document>
|
546
546
|
OUTPUT
|
547
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
547
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
548
548
|
.to be_equivalent_to xmlpp(output)
|
549
549
|
end
|
550
550
|
|
@@ -682,7 +682,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
682
682
|
</bibliography>
|
683
683
|
</standard-document>
|
684
684
|
OUTPUT
|
685
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
685
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
686
686
|
.to be_equivalent_to xmlpp(output)
|
687
687
|
end
|
688
688
|
|
@@ -698,8 +698,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
698
698
|
|
699
699
|
INPUT
|
700
700
|
output = <<~OUTPUT
|
701
|
-
|
702
|
-
|
701
|
+
#{BLANK_HDR}
|
702
|
+
<sections>
|
703
703
|
<terms id='_' obligation='normative'>
|
704
704
|
<title>Terms, definitions and symbols</title>
|
705
705
|
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
@@ -713,7 +713,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
713
713
|
</sections>
|
714
714
|
</standard-document>
|
715
715
|
OUTPUT
|
716
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
716
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
717
717
|
.to be_equivalent_to xmlpp(output)
|
718
718
|
end
|
719
719
|
|
@@ -745,7 +745,43 @@ RSpec.describe Asciidoctor::Standoc do
|
|
745
745
|
</sections>
|
746
746
|
</standard-document>
|
747
747
|
OUTPUT
|
748
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
748
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
749
|
+
.to be_equivalent_to xmlpp(output)
|
750
|
+
end
|
751
|
+
|
752
|
+
it "varies terms symbols & abbreviated terms title" do
|
753
|
+
input = <<~INPUT
|
754
|
+
#{ASCIIDOC_BLANK_HDR}
|
755
|
+
[heading="terms, definitions, symbols and abbreviated terms"]
|
756
|
+
== Terms, Definitions, Abbreviated Terms Section
|
757
|
+
|
758
|
+
=== Term
|
759
|
+
|
760
|
+
=== Abbreviated Terms
|
761
|
+
|
762
|
+
=== Symbols
|
763
|
+
|
764
|
+
INPUT
|
765
|
+
output = <<~OUTPUT
|
766
|
+
#{BLANK_HDR}
|
767
|
+
<sections>
|
768
|
+
<terms id='_' obligation='normative'>
|
769
|
+
<title>Terms, definitions, symbols and abbreviated terms</title>
|
770
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
771
|
+
<term id='term-term'>
|
772
|
+
<preferred>Term</preferred>
|
773
|
+
</term>
|
774
|
+
<definitions id='_' type='abbreviated_terms' obligation='normative'>
|
775
|
+
<title>Abbreviated terms</title>
|
776
|
+
</definitions>
|
777
|
+
<definitions id='_' type='symbols' obligation='normative'>
|
778
|
+
<title>Symbols</title>
|
779
|
+
</definitions>
|
780
|
+
</terms>
|
781
|
+
</sections>
|
782
|
+
</standard-document>
|
783
|
+
OUTPUT
|
784
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
749
785
|
.to be_equivalent_to xmlpp(output)
|
750
786
|
end
|
751
787
|
|
@@ -779,7 +815,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
779
815
|
</annex>
|
780
816
|
</standard-document>
|
781
817
|
OUTPUT
|
782
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
818
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
783
819
|
.to be_equivalent_to xmlpp(output)
|
784
820
|
end
|
785
821
|
|
@@ -813,7 +849,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
813
849
|
</annex>
|
814
850
|
</standard-document>
|
815
851
|
OUTPUT
|
816
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
852
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
817
853
|
.to be_equivalent_to xmlpp(output)
|
818
854
|
end
|
819
855
|
|
@@ -836,7 +872,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
836
872
|
</sections>
|
837
873
|
</standard-document>
|
838
874
|
OUTPUT
|
839
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
875
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
840
876
|
.to be_equivalent_to xmlpp(output)
|
841
877
|
end
|
842
878
|
|
@@ -867,7 +903,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
867
903
|
</sections>
|
868
904
|
</standard-document>
|
869
905
|
OUTPUT
|
870
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
906
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
871
907
|
.to be_equivalent_to xmlpp(output)
|
872
908
|
end
|
873
909
|
|
@@ -899,7 +935,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
899
935
|
</terms></sections>
|
900
936
|
</standard-document>
|
901
937
|
OUTPUT
|
902
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
938
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
903
939
|
.to be_equivalent_to xmlpp(output)
|
904
940
|
end
|
905
941
|
|
@@ -925,7 +961,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
925
961
|
</standard-document>
|
926
962
|
|
927
963
|
OUTPUT
|
928
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
964
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
929
965
|
.to be_equivalent_to xmlpp(output)
|
930
966
|
end
|
931
967
|
|
@@ -953,7 +989,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
953
989
|
</terms></sections>
|
954
990
|
</standard-document>
|
955
991
|
OUTPUT
|
956
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
992
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
957
993
|
.to be_equivalent_to xmlpp(output)
|
958
994
|
end
|
959
995
|
|
@@ -986,7 +1022,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
986
1022
|
</terms></sections>
|
987
1023
|
</standard-document>
|
988
1024
|
OUTPUT
|
989
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1025
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
990
1026
|
.to be_equivalent_to xmlpp(output)
|
991
1027
|
end
|
992
1028
|
|
@@ -1018,7 +1054,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1018
1054
|
</terms></sections>
|
1019
1055
|
</standard-document>
|
1020
1056
|
OUTPUT
|
1021
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1057
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1022
1058
|
.to be_equivalent_to xmlpp(output)
|
1023
1059
|
end
|
1024
1060
|
|
@@ -1030,7 +1066,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1030
1066
|
== Terms and Definitions
|
1031
1067
|
=== Term2
|
1032
1068
|
INPUT
|
1033
|
-
expect { Asciidoctor.convert(input,
|
1069
|
+
expect { Asciidoctor.convert(input, *OPTIONS) }
|
1034
1070
|
.to output(/not referenced/).to_stderr
|
1035
1071
|
end
|
1036
1072
|
|
@@ -1062,7 +1098,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1062
1098
|
</sections>
|
1063
1099
|
</standard-document>
|
1064
1100
|
OUTPUT
|
1065
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1101
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1066
1102
|
.to be_equivalent_to xmlpp(output)
|
1067
1103
|
end
|
1068
1104
|
|
@@ -1124,7 +1160,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1124
1160
|
</sections>
|
1125
1161
|
</standard-document>
|
1126
1162
|
OUTPUT
|
1127
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1163
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1128
1164
|
.to be_equivalent_to xmlpp(output)
|
1129
1165
|
end
|
1130
1166
|
|
@@ -1171,7 +1207,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1171
1207
|
</annex>
|
1172
1208
|
</standard-document>
|
1173
1209
|
OUTPUT
|
1174
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1210
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1175
1211
|
.to be_equivalent_to xmlpp(output)
|
1176
1212
|
end
|
1177
1213
|
|
@@ -1190,7 +1226,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1190
1226
|
</sections>
|
1191
1227
|
</standard-document>
|
1192
1228
|
OUTPUT
|
1193
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input,
|
1229
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1194
1230
|
.to be_equivalent_to xmlpp(output)
|
1195
1231
|
end
|
1196
1232
|
|
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::Standoc do
|
4
4
|
it "processes basic tables" do
|
5
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
5
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
#{ASCIIDOC_BLANK_HDR}
|
7
7
|
.Table Name
|
8
8
|
|===
|
@@ -36,7 +36,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "processes table widths" do
|
39
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
39
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
40
40
|
#{ASCIIDOC_BLANK_HDR}
|
41
41
|
[width=75%]
|
42
42
|
|===
|
@@ -96,7 +96,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
96
96
|
end
|
97
97
|
|
98
98
|
it "processes column widths in tables" do
|
99
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
99
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
100
100
|
#{ASCIIDOC_BLANK_HDR}
|
101
101
|
[cols=".<,.^,^.>"]
|
102
102
|
|===
|
@@ -182,7 +182,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
182
182
|
|
183
183
|
|
184
184
|
it "inserts header rows in a table with a name and no header" do
|
185
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
185
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
186
186
|
#{ASCIIDOC_BLANK_HDR}
|
187
187
|
[headerrows=2]
|
188
188
|
.Table Name
|
@@ -222,7 +222,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
222
222
|
|
223
223
|
|
224
224
|
it "inserts header rows in a table without a name and no header" do
|
225
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
225
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
226
226
|
#{ASCIIDOC_BLANK_HDR}
|
227
227
|
[headerrows=2]
|
228
228
|
|===
|
@@ -258,7 +258,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
258
258
|
end
|
259
259
|
|
260
260
|
it "processes complex tables" do
|
261
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT",
|
261
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
262
262
|
#{ASCIIDOC_BLANK_HDR}
|
263
263
|
[cols="<.^,^.<,^.>,^,^",options="header,footer",headerrows=2,alt="An extensive summary, and illustration, of tables",subsequence="A",options="unnumbered",summary="This is an extremely long, convoluted summary",width=70%,number="3",keep-with-next=true,keep-lines-together=true]
|
264
264
|
.Maximum _permissible_ mass fraction of defects
|
@@ -13,7 +13,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
13
13
|
FileUtils.rm_f "test.xml"
|
14
14
|
FileUtils.rm_f "test.err"
|
15
15
|
begin
|
16
|
-
expect { Asciidoctor.convert(<<~"INPUT",
|
16
|
+
expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to raise_error(SystemExit)
|
17
17
|
= Document title
|
18
18
|
Author
|
19
19
|
:docfile: test.adoc
|
@@ -33,7 +33,7 @@ end
|
|
33
33
|
|
34
34
|
it "warns about missing fields in asciibib" do
|
35
35
|
FileUtils.rm_f "test.err"
|
36
|
-
Asciidoctor.convert(<<~"INPUT",
|
36
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
37
37
|
#{VALIDATING_BLANK_HDR}
|
38
38
|
|
39
39
|
[bibliography]
|
@@ -70,7 +70,7 @@ end
|
|
70
70
|
|
71
71
|
it "warns about missing fields in asciibib" do
|
72
72
|
FileUtils.rm_f "test.err"
|
73
|
-
Asciidoctor.convert(<<~"INPUT",
|
73
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
74
74
|
#{VALIDATING_BLANK_HDR}
|
75
75
|
|
76
76
|
[bibliography]
|
@@ -86,7 +86,7 @@ end
|
|
86
86
|
INPUT
|
87
87
|
errf = File.read("test.err")
|
88
88
|
expect(errf).to include "The following reference is missing an anchor"
|
89
|
-
Asciidoctor.convert(<<~"INPUT",
|
89
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
90
90
|
#{VALIDATING_BLANK_HDR}
|
91
91
|
|
92
92
|
[bibliography]
|
@@ -108,7 +108,7 @@ INPUT
|
|
108
108
|
=begin
|
109
109
|
it "warns about malformed LaTeX" do
|
110
110
|
FileUtils.rm_f "test.err"
|
111
|
-
Asciidoctor.convert(<<~"INPUT",
|
111
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
112
112
|
#{VALIDATING_BLANK_HDR}
|
113
113
|
|
114
114
|
== Clause 1
|
@@ -126,7 +126,7 @@ INPUT
|
|
126
126
|
=begin
|
127
127
|
it "warns about reparsing LaTeX" do
|
128
128
|
FileUtils.rm_f "test.err"
|
129
|
-
expect { Asciidoctor.convert(<<~"INPUT",
|
129
|
+
expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to output(/Retrying/).to_stderr
|
130
130
|
#{VALIDATING_BLANK_HDR}
|
131
131
|
|
132
132
|
== Clause 1
|
@@ -146,7 +146,7 @@ INPUT
|
|
146
146
|
|
147
147
|
it "warns about hanging paragraphs" do
|
148
148
|
FileUtils.rm_f "test.err"
|
149
|
-
Asciidoctor.convert(<<~"INPUT",
|
149
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
150
150
|
#{VALIDATING_BLANK_HDR}
|
151
151
|
|
152
152
|
== Clause 1
|
@@ -162,7 +162,7 @@ INPUT
|
|
162
162
|
|
163
163
|
it "warns that video is a skipped node" do
|
164
164
|
FileUtils.rm_f "test.err"
|
165
|
-
Asciidoctor.convert(<<~"INPUT",
|
165
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
166
166
|
#{VALIDATING_BLANK_HDR}
|
167
167
|
|
168
168
|
video::video_file.mp4[]
|
@@ -172,7 +172,7 @@ INPUT
|
|
172
172
|
|
173
173
|
it "warns that figure does not have title" do
|
174
174
|
FileUtils.rm_f "test.err"
|
175
|
-
Asciidoctor.convert(<<~"INPUT",
|
175
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
176
176
|
#{VALIDATING_BLANK_HDR}
|
177
177
|
|
178
178
|
image::spec/examples/rice_images/rice_image1.png[]
|
@@ -182,7 +182,7 @@ end
|
|
182
182
|
|
183
183
|
it "warns that callouts do not match annotations" do
|
184
184
|
FileUtils.rm_f "test.err"
|
185
|
-
Asciidoctor.convert(<<~"INPUT",
|
185
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
186
186
|
#{VALIDATING_BLANK_HDR}
|
187
187
|
[source,ruby]
|
188
188
|
--
|
@@ -199,7 +199,7 @@ end
|
|
199
199
|
|
200
200
|
it "warns that term source is not a real reference" do
|
201
201
|
FileUtils.rm_f "test.err"
|
202
|
-
Asciidoctor.convert(<<~"INPUT",
|
202
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
203
203
|
#{VALIDATING_BLANK_HDR}
|
204
204
|
|
205
205
|
[.source]
|
@@ -210,7 +210,7 @@ end
|
|
210
210
|
|
211
211
|
it "warns of Non-reference in bibliography" do
|
212
212
|
FileUtils.rm_f "test.err"
|
213
|
-
Asciidoctor.convert(<<~"INPUT",
|
213
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
214
214
|
#{VALIDATING_BLANK_HDR}
|
215
215
|
|
216
216
|
== Normative References
|
@@ -221,7 +221,7 @@ end
|
|
221
221
|
|
222
222
|
it "warns that Table should have title" do
|
223
223
|
FileUtils.rm_f "test.err"
|
224
|
-
Asciidoctor.convert(<<~"INPUT",
|
224
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
225
225
|
#{VALIDATING_BLANK_HDR}
|
226
226
|
|
227
227
|
|===
|
@@ -233,7 +233,7 @@ end
|
|
233
233
|
|
234
234
|
it "validates document against ISO XML schema" do
|
235
235
|
FileUtils.rm_f "test.err"
|
236
|
-
Asciidoctor.convert(<<~"INPUT",
|
236
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
237
237
|
#{VALIDATING_BLANK_HDR}
|
238
238
|
|
239
239
|
[align=mid-air]
|
@@ -247,7 +247,7 @@ it "Warning if terms mismatches IEV" do
|
|
247
247
|
FileUtils.mv File.expand_path("~/.iev/cache"), File.expand_path("~/.iev.pstore1"), force: true
|
248
248
|
FileUtils.rm_f "test_iev/pstore"
|
249
249
|
mock_open_uri('103-01-02')
|
250
|
-
Asciidoctor.convert(<<~"INPUT",
|
250
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
251
251
|
= Document title
|
252
252
|
Author
|
253
253
|
:docfile: test.adoc
|
@@ -271,7 +271,7 @@ it "No warning if English term matches IEV" do
|
|
271
271
|
FileUtils.mv File.expand_path("~/.iev/cache"), File.expand_path("~/.iev.pstore1"), force: true
|
272
272
|
FileUtils.rm_f "test_iev/cache"
|
273
273
|
mock_open_uri('103-01-02')
|
274
|
-
Asciidoctor.convert(<<~"INPUT",
|
274
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
275
275
|
= Document title
|
276
276
|
Author
|
277
277
|
:docfile: test.adoc
|
@@ -295,7 +295,7 @@ it "No warning if French term matches IEV" do
|
|
295
295
|
FileUtils.mv File.expand_path("~/.iev/cache"), File.expand_path("~/.iev.pstore1"), force: true
|
296
296
|
FileUtils.rm_f "test_iev/cache"
|
297
297
|
mock_open_uri('103-01-02')
|
298
|
-
Asciidoctor.convert(<<~"INPUT",
|
298
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
299
299
|
= Document title
|
300
300
|
Author
|
301
301
|
:docfile: test.adoc
|
@@ -330,7 +330,7 @@ it "warns and aborts if id used twice" do
|
|
330
330
|
FileUtils.rm_f "test.xml"
|
331
331
|
FileUtils.rm_f "test.err"
|
332
332
|
begin
|
333
|
-
expect { Asciidoctor.convert(<<~"INPUT",
|
333
|
+
expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to raise_error(SystemExit)
|
334
334
|
= Document title
|
335
335
|
Author
|
336
336
|
:docfile: test.adoc
|
@@ -352,7 +352,7 @@ it "warns and aborts if numeric normative reference" do
|
|
352
352
|
FileUtils.rm_f "test.xml"
|
353
353
|
FileUtils.rm_f "test.err"
|
354
354
|
begin
|
355
|
-
expect { Asciidoctor.convert(<<~"INPUT",
|
355
|
+
expect { Asciidoctor.convert(<<~"INPUT", *OPTIONS) }.to raise_error(SystemExit)
|
356
356
|
= Document title
|
357
357
|
Author
|
358
358
|
:docfile: test.adoc
|
@@ -371,7 +371,7 @@ end
|
|
371
371
|
it "err file succesfully created for docfile path" do
|
372
372
|
FileUtils.rm_rf "test"
|
373
373
|
FileUtils.mkdir_p "test"
|
374
|
-
Asciidoctor.convert(<<~"INPUT",
|
374
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
375
375
|
= Document title
|
376
376
|
Author
|
377
377
|
:docfile: test#{File::ALT_SEPARATOR || File::SEPARATOR}test.adoc
|
@@ -391,7 +391,7 @@ end
|
|
391
391
|
|
392
392
|
it "Warning if no block for footnoteblock" do
|
393
393
|
FileUtils.rm_f "test.err"
|
394
|
-
Asciidoctor.convert(<<~"INPUT",
|
394
|
+
Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
395
395
|
= Document title
|
396
396
|
Author
|
397
397
|
:docfile: test.adoc
|
data/spec/spec_helper.rb
CHANGED