ruby-marc-spec 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/build.yml +18 -0
  3. data/.gitignore +388 -0
  4. data/.gitmodules +3 -0
  5. data/.idea/codeStyles/codeStyleConfig.xml +5 -0
  6. data/.idea/go.imports.xml +6 -0
  7. data/.idea/inspectionProfiles/Project_Default.xml +23 -0
  8. data/.idea/marc_spec.iml +102 -0
  9. data/.idea/misc.xml +6 -0
  10. data/.idea/modules.xml +8 -0
  11. data/.idea/templateLanguages.xml +6 -0
  12. data/.idea/vcs.xml +7 -0
  13. data/.rubocop.yml +269 -0
  14. data/.ruby-version +1 -0
  15. data/.simplecov +8 -0
  16. data/CHANGES.md +3 -0
  17. data/Gemfile +6 -0
  18. data/LICENSE.md +21 -0
  19. data/README.md +172 -0
  20. data/Rakefile +20 -0
  21. data/lib/.rubocop.yml +5 -0
  22. data/lib/marc/spec/module_info.rb +14 -0
  23. data/lib/marc/spec/parsing/closed_int_range.rb +28 -0
  24. data/lib/marc/spec/parsing/closed_lc_alpha_range.rb +28 -0
  25. data/lib/marc/spec/parsing/parser.rb +213 -0
  26. data/lib/marc/spec/parsing.rb +1 -0
  27. data/lib/marc/spec/queries/al_num_range.rb +105 -0
  28. data/lib/marc/spec/queries/applicable.rb +18 -0
  29. data/lib/marc/spec/queries/character_spec.rb +81 -0
  30. data/lib/marc/spec/queries/comparison_string.rb +45 -0
  31. data/lib/marc/spec/queries/condition.rb +133 -0
  32. data/lib/marc/spec/queries/condition_context.rb +49 -0
  33. data/lib/marc/spec/queries/dsl.rb +80 -0
  34. data/lib/marc/spec/queries/indicator_value.rb +77 -0
  35. data/lib/marc/spec/queries/operator.rb +129 -0
  36. data/lib/marc/spec/queries/part.rb +63 -0
  37. data/lib/marc/spec/queries/position.rb +59 -0
  38. data/lib/marc/spec/queries/position_or_range.rb +27 -0
  39. data/lib/marc/spec/queries/query.rb +94 -0
  40. data/lib/marc/spec/queries/query_executor.rb +52 -0
  41. data/lib/marc/spec/queries/selector.rb +12 -0
  42. data/lib/marc/spec/queries/subfield.rb +88 -0
  43. data/lib/marc/spec/queries/subfield_value.rb +63 -0
  44. data/lib/marc/spec/queries/tag.rb +107 -0
  45. data/lib/marc/spec/queries/transform.rb +154 -0
  46. data/lib/marc/spec/queries.rb +1 -0
  47. data/lib/marc/spec.rb +32 -0
  48. data/rakelib/.rubocop.yml +19 -0
  49. data/rakelib/bundle.rake +8 -0
  50. data/rakelib/coverage.rake +11 -0
  51. data/rakelib/gem.rake +54 -0
  52. data/rakelib/parser_specs/formatter.rb +31 -0
  53. data/rakelib/parser_specs/parser_specs.rb.txt.erb +35 -0
  54. data/rakelib/parser_specs/rule.rb +95 -0
  55. data/rakelib/parser_specs/suite.rb +91 -0
  56. data/rakelib/parser_specs/test.rb +97 -0
  57. data/rakelib/parser_specs.rb +1 -0
  58. data/rakelib/rubocop.rake +18 -0
  59. data/rakelib/spec.rake +27 -0
  60. data/ruby-marc-spec.gemspec +42 -0
  61. data/spec/.rubocop.yml +46 -0
  62. data/spec/README.md +16 -0
  63. data/spec/data/b23161018-sru.xml +182 -0
  64. data/spec/data/sandburg.xml +82 -0
  65. data/spec/generated/char_indicator_spec.rb +174 -0
  66. data/spec/generated/char_spec.rb +113 -0
  67. data/spec/generated/comparison_string_spec.rb +74 -0
  68. data/spec/generated/field_tag_spec.rb +156 -0
  69. data/spec/generated/index_char_spec.rb +669 -0
  70. data/spec/generated/index_indicator_spec.rb +174 -0
  71. data/spec/generated/index_spec.rb +113 -0
  72. data/spec/generated/index_sub_spec_spec.rb +1087 -0
  73. data/spec/generated/indicators_spec.rb +75 -0
  74. data/spec/generated/position_or_range_spec.rb +110 -0
  75. data/spec/generated/sub_spec_spec.rb +208 -0
  76. data/spec/generated/sub_spec_sub_spec_spec.rb +1829 -0
  77. data/spec/generated/subfield_char_spec.rb +405 -0
  78. data/spec/generated/subfield_range_range_spec.rb +48 -0
  79. data/spec/generated/subfield_range_spec.rb +87 -0
  80. data/spec/generated/subfield_range_sub_spec_spec.rb +214 -0
  81. data/spec/generated/subfield_tag_range_spec.rb +477 -0
  82. data/spec/generated/subfield_tag_sub_spec_spec.rb +3216 -0
  83. data/spec/generated/subfield_tag_tag_spec.rb +5592 -0
  84. data/spec/marc/spec/parsing/closed_int_range_spec.rb +49 -0
  85. data/spec/marc/spec/parsing/closed_lc_alpha_range_spec.rb +49 -0
  86. data/spec/marc/spec/parsing/parser_spec.rb +545 -0
  87. data/spec/marc/spec/queries/al_num_range_spec.rb +114 -0
  88. data/spec/marc/spec/queries/character_spec_spec.rb +28 -0
  89. data/spec/marc/spec/queries/comparison_string_spec.rb +28 -0
  90. data/spec/marc/spec/queries/indicator_value_spec.rb +28 -0
  91. data/spec/marc/spec/queries/query_spec.rb +200 -0
  92. data/spec/marc/spec/queries/subfield_spec.rb +92 -0
  93. data/spec/marc/spec/queries/subfield_value_spec.rb +31 -0
  94. data/spec/marc/spec/queries/tag_spec.rb +144 -0
  95. data/spec/marc/spec/queries/transform_spec.rb +459 -0
  96. data/spec/marc_spec_spec.rb +247 -0
  97. data/spec/scratch_spec.rb +112 -0
  98. data/spec/spec_helper.rb +23 -0
  99. metadata +341 -0
@@ -0,0 +1,1829 @@
1
+ require 'spec_helper'
2
+ require 'parslet/rig/rspec'
3
+
4
+ module MARC
5
+ module Spec
6
+ module Parsing
7
+ context 'suite' do
8
+ describe :sub_spec_sub_spec do
9
+ let(:parser) { Parser.new }
10
+ let(:reporter) { Parslet::ErrorReporter::Deepest.new }
11
+
12
+ describe 'marc_spec: valid field tag and subspecs' do
13
+ # /valid/wildCombination_validSubSpecSubSpec.json
14
+
15
+ describe 'all wildcards' do
16
+
17
+ it '&& all digits -> valid' do
18
+ # /valid/wildCombination_validSubSpecSubSpec.json
19
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\Poe}', trace: true, reporter: reporter)
20
+ end
21
+
22
+ it '&& all lowercase chars -> valid' do
23
+ # /valid/wildCombination_validSubSpecSubSpec.json
24
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\{}', trace: true, reporter: reporter)
25
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\~}', trace: true, reporter: reporter)
26
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\?}', trace: true, reporter: reporter)
27
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\|}', trace: true, reporter: reporter)
28
+ end
29
+
30
+ it '&& all uppercase chars special leader -> valid' do
31
+ # /valid/wildCombination_validSubSpecSubSpec.json
32
+ expect(parser.marc_spec).to parse('...{245$a}{$a!~\\Poe}', trace: true, reporter: reporter)
33
+ end
34
+
35
+ it '&& all wildcards -> valid' do
36
+ # /valid/wildCombination_validSubSpecSubSpec.json
37
+ expect(parser.marc_spec).to parse('...{245$a}{245$a}', trace: true, reporter: reporter)
38
+ end
39
+
40
+ it '&& mix one lowercase char and two digits -> valid' do
41
+ # /valid/wildCombination_validSubSpecSubSpec.json
42
+ expect(parser.marc_spec).to parse('...{245$a}{$a|$b|$c}', trace: true, reporter: reporter)
43
+ end
44
+
45
+ it '&& mix two lowercase chars and one digit -> valid' do
46
+ # /valid/wildCombination_validSubSpecSubSpec.json
47
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\$}', trace: true, reporter: reporter)
48
+ end
49
+
50
+ it '&& one digit two wildcards right -> valid' do
51
+ # /valid/wildCombination_validSubSpecSubSpec.json
52
+ expect(parser.marc_spec).to parse('...{245$a}{$a!=$b}', trace: true, reporter: reporter)
53
+ end
54
+
55
+ it '&& one lowercase and two wildcards right -> valid' do
56
+ # /valid/wildCombination_validSubSpecSubSpec.json
57
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\=}', trace: true, reporter: reporter)
58
+ end
59
+
60
+ it '&& one uppercase char two wildcards right -> valid' do
61
+ # /valid/wildCombination_validSubSpecSubSpec.json
62
+ expect(parser.marc_spec).to parse('...{245$a}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
63
+ end
64
+
65
+ it '&& one wildcard between uppercase chars -> valid' do
66
+ # /valid/wildCombination_validSubSpecSubSpec.json
67
+ expect(parser.marc_spec).to parse('...{245$a}{$a}{$b|$c}', trace: true, reporter: reporter)
68
+ end
69
+
70
+ it '&& one wildcard left and two lowercase chars -> valid' do
71
+ # /valid/wildCombination_validSubSpecSubSpec.json
72
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\!}', trace: true, reporter: reporter)
73
+ end
74
+
75
+ it '&& one wildcard left two uppercase chars -> valid' do
76
+ # /valid/wildCombination_validSubSpecSubSpec.json
77
+ expect(parser.marc_spec).to parse('...{245$a}{$a|$b}{$c}', trace: true, reporter: reporter)
78
+ end
79
+
80
+ it '&& one wildcard left with two digits -> valid' do
81
+ # /valid/wildCombination_validSubSpecSubSpec.json
82
+ expect(parser.marc_spec).to parse('...{245$a}{?$a}', trace: true, reporter: reporter)
83
+ end
84
+
85
+ it '&& two digits wildcard right -> valid' do
86
+ # /valid/wildCombination_validSubSpecSubSpec.json
87
+ expect(parser.marc_spec).to parse('...{245$a}{$a=$b}', trace: true, reporter: reporter)
88
+ end
89
+
90
+ it '&& two wildcards and one lowercase char right -> valid' do
91
+ # /valid/wildCombination_validSubSpecSubSpec.json
92
+ expect(parser.marc_spec).to parse('...{245$a}{$a~\\test\\}}', trace: true, reporter: reporter)
93
+ end
94
+
95
+ it '&& two wildcards left one uppercase char -> valid' do
96
+ # /valid/wildCombination_validSubSpecSubSpec.json
97
+ expect(parser.marc_spec).to parse('...{245$a}{/#=\\/}', trace: true, reporter: reporter)
98
+ end
99
+
100
+ it '&& two wildcards left with digit -> valid' do
101
+ # /valid/wildCombination_validSubSpecSubSpec.json
102
+ expect(parser.marc_spec).to parse('...{245$a}{$a}', trace: true, reporter: reporter)
103
+ end
104
+
105
+ it '&& wildcard between digits -> valid' do
106
+ # /valid/wildCombination_validSubSpecSubSpec.json
107
+ expect(parser.marc_spec).to parse('...{245$a}{!$a}', trace: true, reporter: reporter)
108
+ end
109
+
110
+ end
111
+
112
+ describe 'two wildcards left with digit' do
113
+
114
+ it '&& all digits -> valid' do
115
+ # /valid/wildCombination_validSubSpecSubSpec.json
116
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\Poe}', trace: true, reporter: reporter)
117
+ end
118
+
119
+ it '&& all lowercase chars -> valid' do
120
+ # /valid/wildCombination_validSubSpecSubSpec.json
121
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\{}', trace: true, reporter: reporter)
122
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\~}', trace: true, reporter: reporter)
123
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\?}', trace: true, reporter: reporter)
124
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\|}', trace: true, reporter: reporter)
125
+ end
126
+
127
+ it '&& all uppercase chars special leader -> valid' do
128
+ # /valid/wildCombination_validSubSpecSubSpec.json
129
+ expect(parser.marc_spec).to parse('...{$a}{$a!~\\Poe}', trace: true, reporter: reporter)
130
+ end
131
+
132
+ it '&& all wildcards -> valid' do
133
+ # /valid/wildCombination_validSubSpecSubSpec.json
134
+ expect(parser.marc_spec).to parse('...{$a}{245$a}', trace: true, reporter: reporter)
135
+ end
136
+
137
+ it '&& mix one lowercase char and two digits -> valid' do
138
+ # /valid/wildCombination_validSubSpecSubSpec.json
139
+ expect(parser.marc_spec).to parse('...{$a}{$a|$b|$c}', trace: true, reporter: reporter)
140
+ end
141
+
142
+ it '&& mix two lowercase chars and one digit -> valid' do
143
+ # /valid/wildCombination_validSubSpecSubSpec.json
144
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\$}', trace: true, reporter: reporter)
145
+ end
146
+
147
+ it '&& one digit two wildcards right -> valid' do
148
+ # /valid/wildCombination_validSubSpecSubSpec.json
149
+ expect(parser.marc_spec).to parse('...{$a}{$a!=$b}', trace: true, reporter: reporter)
150
+ end
151
+
152
+ it '&& one lowercase and two wildcards right -> valid' do
153
+ # /valid/wildCombination_validSubSpecSubSpec.json
154
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\=}', trace: true, reporter: reporter)
155
+ end
156
+
157
+ it '&& one uppercase char two wildcards right -> valid' do
158
+ # /valid/wildCombination_validSubSpecSubSpec.json
159
+ expect(parser.marc_spec).to parse('...{$a}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
160
+ end
161
+
162
+ it '&& one wildcard between uppercase chars -> valid' do
163
+ # /valid/wildCombination_validSubSpecSubSpec.json
164
+ expect(parser.marc_spec).to parse('...{$a}{$a}{$b|$c}', trace: true, reporter: reporter)
165
+ end
166
+
167
+ it '&& one wildcard left and two lowercase chars -> valid' do
168
+ # /valid/wildCombination_validSubSpecSubSpec.json
169
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\!}', trace: true, reporter: reporter)
170
+ end
171
+
172
+ it '&& one wildcard left two uppercase chars -> valid' do
173
+ # /valid/wildCombination_validSubSpecSubSpec.json
174
+ expect(parser.marc_spec).to parse('...{$a}{$a|$b}{$c}', trace: true, reporter: reporter)
175
+ end
176
+
177
+ it '&& one wildcard left with two digits -> valid' do
178
+ # /valid/wildCombination_validSubSpecSubSpec.json
179
+ expect(parser.marc_spec).to parse('...{$a}{?$a}', trace: true, reporter: reporter)
180
+ end
181
+
182
+ it '&& two digits wildcard right -> valid' do
183
+ # /valid/wildCombination_validSubSpecSubSpec.json
184
+ expect(parser.marc_spec).to parse('...{$a}{$a=$b}', trace: true, reporter: reporter)
185
+ end
186
+
187
+ it '&& two wildcards and one lowercase char right -> valid' do
188
+ # /valid/wildCombination_validSubSpecSubSpec.json
189
+ expect(parser.marc_spec).to parse('...{$a}{$a~\\test\\}}', trace: true, reporter: reporter)
190
+ end
191
+
192
+ it '&& two wildcards left one uppercase char -> valid' do
193
+ # /valid/wildCombination_validSubSpecSubSpec.json
194
+ expect(parser.marc_spec).to parse('...{$a}{/#=\\/}', trace: true, reporter: reporter)
195
+ end
196
+
197
+ it '&& two wildcards left with digit -> valid' do
198
+ # /valid/wildCombination_validSubSpecSubSpec.json
199
+ expect(parser.marc_spec).to parse('...{$a}{$a}', trace: true, reporter: reporter)
200
+ end
201
+
202
+ it '&& wildcard between digits -> valid' do
203
+ # /valid/wildCombination_validSubSpecSubSpec.json
204
+ expect(parser.marc_spec).to parse('...{$a}{!$a}', trace: true, reporter: reporter)
205
+ end
206
+
207
+ end
208
+
209
+ describe 'one wildcard left with two digits' do
210
+
211
+ it '&& all digits -> valid' do
212
+ # /valid/wildCombination_validSubSpecSubSpec.json
213
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\Poe}', trace: true, reporter: reporter)
214
+ end
215
+
216
+ it '&& all lowercase chars -> valid' do
217
+ # /valid/wildCombination_validSubSpecSubSpec.json
218
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\{}', trace: true, reporter: reporter)
219
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\~}', trace: true, reporter: reporter)
220
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\?}', trace: true, reporter: reporter)
221
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\|}', trace: true, reporter: reporter)
222
+ end
223
+
224
+ it '&& all uppercase chars special leader -> valid' do
225
+ # /valid/wildCombination_validSubSpecSubSpec.json
226
+ expect(parser.marc_spec).to parse('...{?$a}{$a!~\\Poe}', trace: true, reporter: reporter)
227
+ end
228
+
229
+ it '&& all wildcards -> valid' do
230
+ # /valid/wildCombination_validSubSpecSubSpec.json
231
+ expect(parser.marc_spec).to parse('...{?$a}{245$a}', trace: true, reporter: reporter)
232
+ end
233
+
234
+ it '&& mix one lowercase char and two digits -> valid' do
235
+ # /valid/wildCombination_validSubSpecSubSpec.json
236
+ expect(parser.marc_spec).to parse('...{?$a}{$a|$b|$c}', trace: true, reporter: reporter)
237
+ end
238
+
239
+ it '&& mix two lowercase chars and one digit -> valid' do
240
+ # /valid/wildCombination_validSubSpecSubSpec.json
241
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\$}', trace: true, reporter: reporter)
242
+ end
243
+
244
+ it '&& one digit two wildcards right -> valid' do
245
+ # /valid/wildCombination_validSubSpecSubSpec.json
246
+ expect(parser.marc_spec).to parse('...{?$a}{$a!=$b}', trace: true, reporter: reporter)
247
+ end
248
+
249
+ it '&& one lowercase and two wildcards right -> valid' do
250
+ # /valid/wildCombination_validSubSpecSubSpec.json
251
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\=}', trace: true, reporter: reporter)
252
+ end
253
+
254
+ it '&& one uppercase char two wildcards right -> valid' do
255
+ # /valid/wildCombination_validSubSpecSubSpec.json
256
+ expect(parser.marc_spec).to parse('...{?$a}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
257
+ end
258
+
259
+ it '&& one wildcard between uppercase chars -> valid' do
260
+ # /valid/wildCombination_validSubSpecSubSpec.json
261
+ expect(parser.marc_spec).to parse('...{?$a}{$a}{$b|$c}', trace: true, reporter: reporter)
262
+ end
263
+
264
+ it '&& one wildcard left and two lowercase chars -> valid' do
265
+ # /valid/wildCombination_validSubSpecSubSpec.json
266
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\!}', trace: true, reporter: reporter)
267
+ end
268
+
269
+ it '&& one wildcard left two uppercase chars -> valid' do
270
+ # /valid/wildCombination_validSubSpecSubSpec.json
271
+ expect(parser.marc_spec).to parse('...{?$a}{$a|$b}{$c}', trace: true, reporter: reporter)
272
+ end
273
+
274
+ it '&& one wildcard left with two digits -> valid' do
275
+ # /valid/wildCombination_validSubSpecSubSpec.json
276
+ expect(parser.marc_spec).to parse('...{?$a}{?$a}', trace: true, reporter: reporter)
277
+ end
278
+
279
+ it '&& two digits wildcard right -> valid' do
280
+ # /valid/wildCombination_validSubSpecSubSpec.json
281
+ expect(parser.marc_spec).to parse('...{?$a}{$a=$b}', trace: true, reporter: reporter)
282
+ end
283
+
284
+ it '&& two wildcards and one lowercase char right -> valid' do
285
+ # /valid/wildCombination_validSubSpecSubSpec.json
286
+ expect(parser.marc_spec).to parse('...{?$a}{$a~\\test\\}}', trace: true, reporter: reporter)
287
+ end
288
+
289
+ it '&& two wildcards left one uppercase char -> valid' do
290
+ # /valid/wildCombination_validSubSpecSubSpec.json
291
+ expect(parser.marc_spec).to parse('...{?$a}{/#=\\/}', trace: true, reporter: reporter)
292
+ end
293
+
294
+ it '&& two wildcards left with digit -> valid' do
295
+ # /valid/wildCombination_validSubSpecSubSpec.json
296
+ expect(parser.marc_spec).to parse('...{?$a}{$a}', trace: true, reporter: reporter)
297
+ end
298
+
299
+ it '&& wildcard between digits -> valid' do
300
+ # /valid/wildCombination_validSubSpecSubSpec.json
301
+ expect(parser.marc_spec).to parse('...{?$a}{!$a}', trace: true, reporter: reporter)
302
+ end
303
+
304
+ end
305
+
306
+ describe 'wildcard between digits' do
307
+
308
+ it '&& all digits -> valid' do
309
+ # /valid/wildCombination_validSubSpecSubSpec.json
310
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\Poe}', trace: true, reporter: reporter)
311
+ end
312
+
313
+ it '&& all lowercase chars -> valid' do
314
+ # /valid/wildCombination_validSubSpecSubSpec.json
315
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\{}', trace: true, reporter: reporter)
316
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\~}', trace: true, reporter: reporter)
317
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\?}', trace: true, reporter: reporter)
318
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\|}', trace: true, reporter: reporter)
319
+ end
320
+
321
+ it '&& all uppercase chars special leader -> valid' do
322
+ # /valid/wildCombination_validSubSpecSubSpec.json
323
+ expect(parser.marc_spec).to parse('...{!$a}{$a!~\\Poe}', trace: true, reporter: reporter)
324
+ end
325
+
326
+ it '&& all wildcards -> valid' do
327
+ # /valid/wildCombination_validSubSpecSubSpec.json
328
+ expect(parser.marc_spec).to parse('...{!$a}{245$a}', trace: true, reporter: reporter)
329
+ end
330
+
331
+ it '&& mix one lowercase char and two digits -> valid' do
332
+ # /valid/wildCombination_validSubSpecSubSpec.json
333
+ expect(parser.marc_spec).to parse('...{!$a}{$a|$b|$c}', trace: true, reporter: reporter)
334
+ end
335
+
336
+ it '&& mix two lowercase chars and one digit -> valid' do
337
+ # /valid/wildCombination_validSubSpecSubSpec.json
338
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\$}', trace: true, reporter: reporter)
339
+ end
340
+
341
+ it '&& one digit two wildcards right -> valid' do
342
+ # /valid/wildCombination_validSubSpecSubSpec.json
343
+ expect(parser.marc_spec).to parse('...{!$a}{$a!=$b}', trace: true, reporter: reporter)
344
+ end
345
+
346
+ it '&& one lowercase and two wildcards right -> valid' do
347
+ # /valid/wildCombination_validSubSpecSubSpec.json
348
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\=}', trace: true, reporter: reporter)
349
+ end
350
+
351
+ it '&& one uppercase char two wildcards right -> valid' do
352
+ # /valid/wildCombination_validSubSpecSubSpec.json
353
+ expect(parser.marc_spec).to parse('...{!$a}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
354
+ end
355
+
356
+ it '&& one wildcard between uppercase chars -> valid' do
357
+ # /valid/wildCombination_validSubSpecSubSpec.json
358
+ expect(parser.marc_spec).to parse('...{!$a}{$a}{$b|$c}', trace: true, reporter: reporter)
359
+ end
360
+
361
+ it '&& one wildcard left and two lowercase chars -> valid' do
362
+ # /valid/wildCombination_validSubSpecSubSpec.json
363
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\!}', trace: true, reporter: reporter)
364
+ end
365
+
366
+ it '&& one wildcard left two uppercase chars -> valid' do
367
+ # /valid/wildCombination_validSubSpecSubSpec.json
368
+ expect(parser.marc_spec).to parse('...{!$a}{$a|$b}{$c}', trace: true, reporter: reporter)
369
+ end
370
+
371
+ it '&& one wildcard left with two digits -> valid' do
372
+ # /valid/wildCombination_validSubSpecSubSpec.json
373
+ expect(parser.marc_spec).to parse('...{!$a}{?$a}', trace: true, reporter: reporter)
374
+ end
375
+
376
+ it '&& two digits wildcard right -> valid' do
377
+ # /valid/wildCombination_validSubSpecSubSpec.json
378
+ expect(parser.marc_spec).to parse('...{!$a}{$a=$b}', trace: true, reporter: reporter)
379
+ end
380
+
381
+ it '&& two wildcards and one lowercase char right -> valid' do
382
+ # /valid/wildCombination_validSubSpecSubSpec.json
383
+ expect(parser.marc_spec).to parse('...{!$a}{$a~\\test\\}}', trace: true, reporter: reporter)
384
+ end
385
+
386
+ it '&& two wildcards left one uppercase char -> valid' do
387
+ # /valid/wildCombination_validSubSpecSubSpec.json
388
+ expect(parser.marc_spec).to parse('...{!$a}{/#=\\/}', trace: true, reporter: reporter)
389
+ end
390
+
391
+ it '&& two wildcards left with digit -> valid' do
392
+ # /valid/wildCombination_validSubSpecSubSpec.json
393
+ expect(parser.marc_spec).to parse('...{!$a}{$a}', trace: true, reporter: reporter)
394
+ end
395
+
396
+ it '&& wildcard between digits -> valid' do
397
+ # /valid/wildCombination_validSubSpecSubSpec.json
398
+ expect(parser.marc_spec).to parse('...{!$a}{!$a}', trace: true, reporter: reporter)
399
+ end
400
+
401
+ end
402
+
403
+ describe 'two digits wildcard right' do
404
+
405
+ it '&& all digits -> valid' do
406
+ # /valid/wildCombination_validSubSpecSubSpec.json
407
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\Poe}', trace: true, reporter: reporter)
408
+ end
409
+
410
+ it '&& all lowercase chars -> valid' do
411
+ # /valid/wildCombination_validSubSpecSubSpec.json
412
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\{}', trace: true, reporter: reporter)
413
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\~}', trace: true, reporter: reporter)
414
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\?}', trace: true, reporter: reporter)
415
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\|}', trace: true, reporter: reporter)
416
+ end
417
+
418
+ it '&& all uppercase chars special leader -> valid' do
419
+ # /valid/wildCombination_validSubSpecSubSpec.json
420
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a!~\\Poe}', trace: true, reporter: reporter)
421
+ end
422
+
423
+ it '&& all wildcards -> valid' do
424
+ # /valid/wildCombination_validSubSpecSubSpec.json
425
+ expect(parser.marc_spec).to parse('...{$a=$b}{245$a}', trace: true, reporter: reporter)
426
+ end
427
+
428
+ it '&& mix one lowercase char and two digits -> valid' do
429
+ # /valid/wildCombination_validSubSpecSubSpec.json
430
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a|$b|$c}', trace: true, reporter: reporter)
431
+ end
432
+
433
+ it '&& mix two lowercase chars and one digit -> valid' do
434
+ # /valid/wildCombination_validSubSpecSubSpec.json
435
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\$}', trace: true, reporter: reporter)
436
+ end
437
+
438
+ it '&& one digit two wildcards right -> valid' do
439
+ # /valid/wildCombination_validSubSpecSubSpec.json
440
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a!=$b}', trace: true, reporter: reporter)
441
+ end
442
+
443
+ it '&& one lowercase and two wildcards right -> valid' do
444
+ # /valid/wildCombination_validSubSpecSubSpec.json
445
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\=}', trace: true, reporter: reporter)
446
+ end
447
+
448
+ it '&& one uppercase char two wildcards right -> valid' do
449
+ # /valid/wildCombination_validSubSpecSubSpec.json
450
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
451
+ end
452
+
453
+ it '&& one wildcard between uppercase chars -> valid' do
454
+ # /valid/wildCombination_validSubSpecSubSpec.json
455
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a}{$b|$c}', trace: true, reporter: reporter)
456
+ end
457
+
458
+ it '&& one wildcard left and two lowercase chars -> valid' do
459
+ # /valid/wildCombination_validSubSpecSubSpec.json
460
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\!}', trace: true, reporter: reporter)
461
+ end
462
+
463
+ it '&& one wildcard left two uppercase chars -> valid' do
464
+ # /valid/wildCombination_validSubSpecSubSpec.json
465
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a|$b}{$c}', trace: true, reporter: reporter)
466
+ end
467
+
468
+ it '&& one wildcard left with two digits -> valid' do
469
+ # /valid/wildCombination_validSubSpecSubSpec.json
470
+ expect(parser.marc_spec).to parse('...{$a=$b}{?$a}', trace: true, reporter: reporter)
471
+ end
472
+
473
+ it '&& two digits wildcard right -> valid' do
474
+ # /valid/wildCombination_validSubSpecSubSpec.json
475
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a=$b}', trace: true, reporter: reporter)
476
+ end
477
+
478
+ it '&& two wildcards and one lowercase char right -> valid' do
479
+ # /valid/wildCombination_validSubSpecSubSpec.json
480
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a~\\test\\}}', trace: true, reporter: reporter)
481
+ end
482
+
483
+ it '&& two wildcards left one uppercase char -> valid' do
484
+ # /valid/wildCombination_validSubSpecSubSpec.json
485
+ expect(parser.marc_spec).to parse('...{$a=$b}{/#=\\/}', trace: true, reporter: reporter)
486
+ end
487
+
488
+ it '&& two wildcards left with digit -> valid' do
489
+ # /valid/wildCombination_validSubSpecSubSpec.json
490
+ expect(parser.marc_spec).to parse('...{$a=$b}{$a}', trace: true, reporter: reporter)
491
+ end
492
+
493
+ it '&& wildcard between digits -> valid' do
494
+ # /valid/wildCombination_validSubSpecSubSpec.json
495
+ expect(parser.marc_spec).to parse('...{$a=$b}{!$a}', trace: true, reporter: reporter)
496
+ end
497
+
498
+ end
499
+
500
+ describe 'one digit two wildcards right' do
501
+
502
+ it '&& all digits -> valid' do
503
+ # /valid/wildCombination_validSubSpecSubSpec.json
504
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\Poe}', trace: true, reporter: reporter)
505
+ end
506
+
507
+ it '&& all lowercase chars -> valid' do
508
+ # /valid/wildCombination_validSubSpecSubSpec.json
509
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\{}', trace: true, reporter: reporter)
510
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\~}', trace: true, reporter: reporter)
511
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\?}', trace: true, reporter: reporter)
512
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\|}', trace: true, reporter: reporter)
513
+ end
514
+
515
+ it '&& all uppercase chars special leader -> valid' do
516
+ # /valid/wildCombination_validSubSpecSubSpec.json
517
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a!~\\Poe}', trace: true, reporter: reporter)
518
+ end
519
+
520
+ it '&& all wildcards -> valid' do
521
+ # /valid/wildCombination_validSubSpecSubSpec.json
522
+ expect(parser.marc_spec).to parse('...{$a!=$b}{245$a}', trace: true, reporter: reporter)
523
+ end
524
+
525
+ it '&& mix one lowercase char and two digits -> valid' do
526
+ # /valid/wildCombination_validSubSpecSubSpec.json
527
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a|$b|$c}', trace: true, reporter: reporter)
528
+ end
529
+
530
+ it '&& mix two lowercase chars and one digit -> valid' do
531
+ # /valid/wildCombination_validSubSpecSubSpec.json
532
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\$}', trace: true, reporter: reporter)
533
+ end
534
+
535
+ it '&& one digit two wildcards right -> valid' do
536
+ # /valid/wildCombination_validSubSpecSubSpec.json
537
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a!=$b}', trace: true, reporter: reporter)
538
+ end
539
+
540
+ it '&& one lowercase and two wildcards right -> valid' do
541
+ # /valid/wildCombination_validSubSpecSubSpec.json
542
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\=}', trace: true, reporter: reporter)
543
+ end
544
+
545
+ it '&& one uppercase char two wildcards right -> valid' do
546
+ # /valid/wildCombination_validSubSpecSubSpec.json
547
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
548
+ end
549
+
550
+ it '&& one wildcard between uppercase chars -> valid' do
551
+ # /valid/wildCombination_validSubSpecSubSpec.json
552
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a}{$b|$c}', trace: true, reporter: reporter)
553
+ end
554
+
555
+ it '&& one wildcard left and two lowercase chars -> valid' do
556
+ # /valid/wildCombination_validSubSpecSubSpec.json
557
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\!}', trace: true, reporter: reporter)
558
+ end
559
+
560
+ it '&& one wildcard left two uppercase chars -> valid' do
561
+ # /valid/wildCombination_validSubSpecSubSpec.json
562
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a|$b}{$c}', trace: true, reporter: reporter)
563
+ end
564
+
565
+ it '&& one wildcard left with two digits -> valid' do
566
+ # /valid/wildCombination_validSubSpecSubSpec.json
567
+ expect(parser.marc_spec).to parse('...{$a!=$b}{?$a}', trace: true, reporter: reporter)
568
+ end
569
+
570
+ it '&& two digits wildcard right -> valid' do
571
+ # /valid/wildCombination_validSubSpecSubSpec.json
572
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a=$b}', trace: true, reporter: reporter)
573
+ end
574
+
575
+ it '&& two wildcards and one lowercase char right -> valid' do
576
+ # /valid/wildCombination_validSubSpecSubSpec.json
577
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a~\\test\\}}', trace: true, reporter: reporter)
578
+ end
579
+
580
+ it '&& two wildcards left one uppercase char -> valid' do
581
+ # /valid/wildCombination_validSubSpecSubSpec.json
582
+ expect(parser.marc_spec).to parse('...{$a!=$b}{/#=\\/}', trace: true, reporter: reporter)
583
+ end
584
+
585
+ it '&& two wildcards left with digit -> valid' do
586
+ # /valid/wildCombination_validSubSpecSubSpec.json
587
+ expect(parser.marc_spec).to parse('...{$a!=$b}{$a}', trace: true, reporter: reporter)
588
+ end
589
+
590
+ it '&& wildcard between digits -> valid' do
591
+ # /valid/wildCombination_validSubSpecSubSpec.json
592
+ expect(parser.marc_spec).to parse('...{$a!=$b}{!$a}', trace: true, reporter: reporter)
593
+ end
594
+
595
+ end
596
+
597
+ describe 'all digits' do
598
+
599
+ it '&& all digits -> valid' do
600
+ # /valid/wildCombination_validSubSpecSubSpec.json
601
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\Poe}', trace: true, reporter: reporter)
602
+ end
603
+
604
+ it '&& all lowercase chars -> valid' do
605
+ # /valid/wildCombination_validSubSpecSubSpec.json
606
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\{}', trace: true, reporter: reporter)
607
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\~}', trace: true, reporter: reporter)
608
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\?}', trace: true, reporter: reporter)
609
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\|}', trace: true, reporter: reporter)
610
+ end
611
+
612
+ it '&& all uppercase chars special leader -> valid' do
613
+ # /valid/wildCombination_validSubSpecSubSpec.json
614
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a!~\\Poe}', trace: true, reporter: reporter)
615
+ end
616
+
617
+ it '&& all wildcards -> valid' do
618
+ # /valid/wildCombination_validSubSpecSubSpec.json
619
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{245$a}', trace: true, reporter: reporter)
620
+ end
621
+
622
+ it '&& mix one lowercase char and two digits -> valid' do
623
+ # /valid/wildCombination_validSubSpecSubSpec.json
624
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a|$b|$c}', trace: true, reporter: reporter)
625
+ end
626
+
627
+ it '&& mix two lowercase chars and one digit -> valid' do
628
+ # /valid/wildCombination_validSubSpecSubSpec.json
629
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\$}', trace: true, reporter: reporter)
630
+ end
631
+
632
+ it '&& one digit two wildcards right -> valid' do
633
+ # /valid/wildCombination_validSubSpecSubSpec.json
634
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a!=$b}', trace: true, reporter: reporter)
635
+ end
636
+
637
+ it '&& one lowercase and two wildcards right -> valid' do
638
+ # /valid/wildCombination_validSubSpecSubSpec.json
639
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\=}', trace: true, reporter: reporter)
640
+ end
641
+
642
+ it '&& one uppercase char two wildcards right -> valid' do
643
+ # /valid/wildCombination_validSubSpecSubSpec.json
644
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
645
+ end
646
+
647
+ it '&& one wildcard between uppercase chars -> valid' do
648
+ # /valid/wildCombination_validSubSpecSubSpec.json
649
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a}{$b|$c}', trace: true, reporter: reporter)
650
+ end
651
+
652
+ it '&& one wildcard left and two lowercase chars -> valid' do
653
+ # /valid/wildCombination_validSubSpecSubSpec.json
654
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\!}', trace: true, reporter: reporter)
655
+ end
656
+
657
+ it '&& one wildcard left two uppercase chars -> valid' do
658
+ # /valid/wildCombination_validSubSpecSubSpec.json
659
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a|$b}{$c}', trace: true, reporter: reporter)
660
+ end
661
+
662
+ it '&& one wildcard left with two digits -> valid' do
663
+ # /valid/wildCombination_validSubSpecSubSpec.json
664
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{?$a}', trace: true, reporter: reporter)
665
+ end
666
+
667
+ it '&& two digits wildcard right -> valid' do
668
+ # /valid/wildCombination_validSubSpecSubSpec.json
669
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a=$b}', trace: true, reporter: reporter)
670
+ end
671
+
672
+ it '&& two wildcards and one lowercase char right -> valid' do
673
+ # /valid/wildCombination_validSubSpecSubSpec.json
674
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a~\\test\\}}', trace: true, reporter: reporter)
675
+ end
676
+
677
+ it '&& two wildcards left one uppercase char -> valid' do
678
+ # /valid/wildCombination_validSubSpecSubSpec.json
679
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{/#=\\/}', trace: true, reporter: reporter)
680
+ end
681
+
682
+ it '&& two wildcards left with digit -> valid' do
683
+ # /valid/wildCombination_validSubSpecSubSpec.json
684
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{$a}', trace: true, reporter: reporter)
685
+ end
686
+
687
+ it '&& wildcard between digits -> valid' do
688
+ # /valid/wildCombination_validSubSpecSubSpec.json
689
+ expect(parser.marc_spec).to parse('...{$a~\\Poe}{!$a}', trace: true, reporter: reporter)
690
+ end
691
+
692
+ end
693
+
694
+ describe 'all uppercase chars special leader' do
695
+
696
+ it '&& all digits -> valid' do
697
+ # /valid/wildCombination_validSubSpecSubSpec.json
698
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\Poe}', trace: true, reporter: reporter)
699
+ end
700
+
701
+ it '&& all lowercase chars -> valid' do
702
+ # /valid/wildCombination_validSubSpecSubSpec.json
703
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\{}', trace: true, reporter: reporter)
704
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\~}', trace: true, reporter: reporter)
705
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\?}', trace: true, reporter: reporter)
706
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\|}', trace: true, reporter: reporter)
707
+ end
708
+
709
+ it '&& all uppercase chars special leader -> valid' do
710
+ # /valid/wildCombination_validSubSpecSubSpec.json
711
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a!~\\Poe}', trace: true, reporter: reporter)
712
+ end
713
+
714
+ it '&& all wildcards -> valid' do
715
+ # /valid/wildCombination_validSubSpecSubSpec.json
716
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{245$a}', trace: true, reporter: reporter)
717
+ end
718
+
719
+ it '&& mix one lowercase char and two digits -> valid' do
720
+ # /valid/wildCombination_validSubSpecSubSpec.json
721
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a|$b|$c}', trace: true, reporter: reporter)
722
+ end
723
+
724
+ it '&& mix two lowercase chars and one digit -> valid' do
725
+ # /valid/wildCombination_validSubSpecSubSpec.json
726
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\$}', trace: true, reporter: reporter)
727
+ end
728
+
729
+ it '&& one digit two wildcards right -> valid' do
730
+ # /valid/wildCombination_validSubSpecSubSpec.json
731
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a!=$b}', trace: true, reporter: reporter)
732
+ end
733
+
734
+ it '&& one lowercase and two wildcards right -> valid' do
735
+ # /valid/wildCombination_validSubSpecSubSpec.json
736
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\=}', trace: true, reporter: reporter)
737
+ end
738
+
739
+ it '&& one uppercase char two wildcards right -> valid' do
740
+ # /valid/wildCombination_validSubSpecSubSpec.json
741
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
742
+ end
743
+
744
+ it '&& one wildcard between uppercase chars -> valid' do
745
+ # /valid/wildCombination_validSubSpecSubSpec.json
746
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a}{$b|$c}', trace: true, reporter: reporter)
747
+ end
748
+
749
+ it '&& one wildcard left and two lowercase chars -> valid' do
750
+ # /valid/wildCombination_validSubSpecSubSpec.json
751
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\!}', trace: true, reporter: reporter)
752
+ end
753
+
754
+ it '&& one wildcard left two uppercase chars -> valid' do
755
+ # /valid/wildCombination_validSubSpecSubSpec.json
756
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a|$b}{$c}', trace: true, reporter: reporter)
757
+ end
758
+
759
+ it '&& one wildcard left with two digits -> valid' do
760
+ # /valid/wildCombination_validSubSpecSubSpec.json
761
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{?$a}', trace: true, reporter: reporter)
762
+ end
763
+
764
+ it '&& two digits wildcard right -> valid' do
765
+ # /valid/wildCombination_validSubSpecSubSpec.json
766
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a=$b}', trace: true, reporter: reporter)
767
+ end
768
+
769
+ it '&& two wildcards and one lowercase char right -> valid' do
770
+ # /valid/wildCombination_validSubSpecSubSpec.json
771
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a~\\test\\}}', trace: true, reporter: reporter)
772
+ end
773
+
774
+ it '&& two wildcards left one uppercase char -> valid' do
775
+ # /valid/wildCombination_validSubSpecSubSpec.json
776
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{/#=\\/}', trace: true, reporter: reporter)
777
+ end
778
+
779
+ it '&& two wildcards left with digit -> valid' do
780
+ # /valid/wildCombination_validSubSpecSubSpec.json
781
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{$a}', trace: true, reporter: reporter)
782
+ end
783
+
784
+ it '&& wildcard between digits -> valid' do
785
+ # /valid/wildCombination_validSubSpecSubSpec.json
786
+ expect(parser.marc_spec).to parse('...{$a!~\\Poe}{!$a}', trace: true, reporter: reporter)
787
+ end
788
+
789
+ end
790
+
791
+ describe 'two wildcards left one uppercase char' do
792
+
793
+ it '&& all digits -> valid' do
794
+ # /valid/wildCombination_validSubSpecSubSpec.json
795
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\Poe}', trace: true, reporter: reporter)
796
+ end
797
+
798
+ it '&& all lowercase chars -> valid' do
799
+ # /valid/wildCombination_validSubSpecSubSpec.json
800
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\{}', trace: true, reporter: reporter)
801
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\~}', trace: true, reporter: reporter)
802
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\?}', trace: true, reporter: reporter)
803
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\|}', trace: true, reporter: reporter)
804
+ end
805
+
806
+ it '&& all uppercase chars special leader -> valid' do
807
+ # /valid/wildCombination_validSubSpecSubSpec.json
808
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a!~\\Poe}', trace: true, reporter: reporter)
809
+ end
810
+
811
+ it '&& all wildcards -> valid' do
812
+ # /valid/wildCombination_validSubSpecSubSpec.json
813
+ expect(parser.marc_spec).to parse('...{/#=\\/}{245$a}', trace: true, reporter: reporter)
814
+ end
815
+
816
+ it '&& mix one lowercase char and two digits -> valid' do
817
+ # /valid/wildCombination_validSubSpecSubSpec.json
818
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a|$b|$c}', trace: true, reporter: reporter)
819
+ end
820
+
821
+ it '&& mix two lowercase chars and one digit -> valid' do
822
+ # /valid/wildCombination_validSubSpecSubSpec.json
823
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\$}', trace: true, reporter: reporter)
824
+ end
825
+
826
+ it '&& one digit two wildcards right -> valid' do
827
+ # /valid/wildCombination_validSubSpecSubSpec.json
828
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a!=$b}', trace: true, reporter: reporter)
829
+ end
830
+
831
+ it '&& one lowercase and two wildcards right -> valid' do
832
+ # /valid/wildCombination_validSubSpecSubSpec.json
833
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\=}', trace: true, reporter: reporter)
834
+ end
835
+
836
+ it '&& one uppercase char two wildcards right -> valid' do
837
+ # /valid/wildCombination_validSubSpecSubSpec.json
838
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
839
+ end
840
+
841
+ it '&& one wildcard between uppercase chars -> valid' do
842
+ # /valid/wildCombination_validSubSpecSubSpec.json
843
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a}{$b|$c}', trace: true, reporter: reporter)
844
+ end
845
+
846
+ it '&& one wildcard left and two lowercase chars -> valid' do
847
+ # /valid/wildCombination_validSubSpecSubSpec.json
848
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\!}', trace: true, reporter: reporter)
849
+ end
850
+
851
+ it '&& one wildcard left two uppercase chars -> valid' do
852
+ # /valid/wildCombination_validSubSpecSubSpec.json
853
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a|$b}{$c}', trace: true, reporter: reporter)
854
+ end
855
+
856
+ it '&& one wildcard left with two digits -> valid' do
857
+ # /valid/wildCombination_validSubSpecSubSpec.json
858
+ expect(parser.marc_spec).to parse('...{/#=\\/}{?$a}', trace: true, reporter: reporter)
859
+ end
860
+
861
+ it '&& two digits wildcard right -> valid' do
862
+ # /valid/wildCombination_validSubSpecSubSpec.json
863
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a=$b}', trace: true, reporter: reporter)
864
+ end
865
+
866
+ it '&& two wildcards and one lowercase char right -> valid' do
867
+ # /valid/wildCombination_validSubSpecSubSpec.json
868
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a~\\test\\}}', trace: true, reporter: reporter)
869
+ end
870
+
871
+ it '&& two wildcards left one uppercase char -> valid' do
872
+ # /valid/wildCombination_validSubSpecSubSpec.json
873
+ expect(parser.marc_spec).to parse('...{/#=\\/}{/#=\\/}', trace: true, reporter: reporter)
874
+ end
875
+
876
+ it '&& two wildcards left with digit -> valid' do
877
+ # /valid/wildCombination_validSubSpecSubSpec.json
878
+ expect(parser.marc_spec).to parse('...{/#=\\/}{$a}', trace: true, reporter: reporter)
879
+ end
880
+
881
+ it '&& wildcard between digits -> valid' do
882
+ # /valid/wildCombination_validSubSpecSubSpec.json
883
+ expect(parser.marc_spec).to parse('...{/#=\\/}{!$a}', trace: true, reporter: reporter)
884
+ end
885
+
886
+ end
887
+
888
+ describe 'one wildcard left two uppercase chars' do
889
+
890
+ it '&& all digits -> valid' do
891
+ # /valid/wildCombination_validSubSpecSubSpec.json
892
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\Poe}', trace: true, reporter: reporter)
893
+ end
894
+
895
+ it '&& all lowercase chars -> valid' do
896
+ # /valid/wildCombination_validSubSpecSubSpec.json
897
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\{}', trace: true, reporter: reporter)
898
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\~}', trace: true, reporter: reporter)
899
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\?}', trace: true, reporter: reporter)
900
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\|}', trace: true, reporter: reporter)
901
+ end
902
+
903
+ it '&& all uppercase chars special leader -> valid' do
904
+ # /valid/wildCombination_validSubSpecSubSpec.json
905
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a!~\\Poe}', trace: true, reporter: reporter)
906
+ end
907
+
908
+ it '&& all wildcards -> valid' do
909
+ # /valid/wildCombination_validSubSpecSubSpec.json
910
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{245$a}', trace: true, reporter: reporter)
911
+ end
912
+
913
+ it '&& mix one lowercase char and two digits -> valid' do
914
+ # /valid/wildCombination_validSubSpecSubSpec.json
915
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a|$b|$c}', trace: true, reporter: reporter)
916
+ end
917
+
918
+ it '&& mix two lowercase chars and one digit -> valid' do
919
+ # /valid/wildCombination_validSubSpecSubSpec.json
920
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\$}', trace: true, reporter: reporter)
921
+ end
922
+
923
+ it '&& one digit two wildcards right -> valid' do
924
+ # /valid/wildCombination_validSubSpecSubSpec.json
925
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a!=$b}', trace: true, reporter: reporter)
926
+ end
927
+
928
+ it '&& one lowercase and two wildcards right -> valid' do
929
+ # /valid/wildCombination_validSubSpecSubSpec.json
930
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\=}', trace: true, reporter: reporter)
931
+ end
932
+
933
+ it '&& one uppercase char two wildcards right -> valid' do
934
+ # /valid/wildCombination_validSubSpecSubSpec.json
935
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
936
+ end
937
+
938
+ it '&& one wildcard between uppercase chars -> valid' do
939
+ # /valid/wildCombination_validSubSpecSubSpec.json
940
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a}{$b|$c}', trace: true, reporter: reporter)
941
+ end
942
+
943
+ it '&& one wildcard left and two lowercase chars -> valid' do
944
+ # /valid/wildCombination_validSubSpecSubSpec.json
945
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\!}', trace: true, reporter: reporter)
946
+ end
947
+
948
+ it '&& one wildcard left two uppercase chars -> valid' do
949
+ # /valid/wildCombination_validSubSpecSubSpec.json
950
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a|$b}{$c}', trace: true, reporter: reporter)
951
+ end
952
+
953
+ it '&& one wildcard left with two digits -> valid' do
954
+ # /valid/wildCombination_validSubSpecSubSpec.json
955
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{?$a}', trace: true, reporter: reporter)
956
+ end
957
+
958
+ it '&& two digits wildcard right -> valid' do
959
+ # /valid/wildCombination_validSubSpecSubSpec.json
960
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a=$b}', trace: true, reporter: reporter)
961
+ end
962
+
963
+ it '&& two wildcards and one lowercase char right -> valid' do
964
+ # /valid/wildCombination_validSubSpecSubSpec.json
965
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a~\\test\\}}', trace: true, reporter: reporter)
966
+ end
967
+
968
+ it '&& two wildcards left one uppercase char -> valid' do
969
+ # /valid/wildCombination_validSubSpecSubSpec.json
970
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{/#=\\/}', trace: true, reporter: reporter)
971
+ end
972
+
973
+ it '&& two wildcards left with digit -> valid' do
974
+ # /valid/wildCombination_validSubSpecSubSpec.json
975
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{$a}', trace: true, reporter: reporter)
976
+ end
977
+
978
+ it '&& wildcard between digits -> valid' do
979
+ # /valid/wildCombination_validSubSpecSubSpec.json
980
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c}{!$a}', trace: true, reporter: reporter)
981
+ end
982
+
983
+ end
984
+
985
+ describe 'one wildcard between uppercase chars' do
986
+
987
+ it '&& all digits -> valid' do
988
+ # /valid/wildCombination_validSubSpecSubSpec.json
989
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\Poe}', trace: true, reporter: reporter)
990
+ end
991
+
992
+ it '&& all lowercase chars -> valid' do
993
+ # /valid/wildCombination_validSubSpecSubSpec.json
994
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\{}', trace: true, reporter: reporter)
995
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\~}', trace: true, reporter: reporter)
996
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\?}', trace: true, reporter: reporter)
997
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\|}', trace: true, reporter: reporter)
998
+ end
999
+
1000
+ it '&& all uppercase chars special leader -> valid' do
1001
+ # /valid/wildCombination_validSubSpecSubSpec.json
1002
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a!~\\Poe}', trace: true, reporter: reporter)
1003
+ end
1004
+
1005
+ it '&& all wildcards -> valid' do
1006
+ # /valid/wildCombination_validSubSpecSubSpec.json
1007
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{245$a}', trace: true, reporter: reporter)
1008
+ end
1009
+
1010
+ it '&& mix one lowercase char and two digits -> valid' do
1011
+ # /valid/wildCombination_validSubSpecSubSpec.json
1012
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a|$b|$c}', trace: true, reporter: reporter)
1013
+ end
1014
+
1015
+ it '&& mix two lowercase chars and one digit -> valid' do
1016
+ # /valid/wildCombination_validSubSpecSubSpec.json
1017
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\$}', trace: true, reporter: reporter)
1018
+ end
1019
+
1020
+ it '&& one digit two wildcards right -> valid' do
1021
+ # /valid/wildCombination_validSubSpecSubSpec.json
1022
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a!=$b}', trace: true, reporter: reporter)
1023
+ end
1024
+
1025
+ it '&& one lowercase and two wildcards right -> valid' do
1026
+ # /valid/wildCombination_validSubSpecSubSpec.json
1027
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\=}', trace: true, reporter: reporter)
1028
+ end
1029
+
1030
+ it '&& one uppercase char two wildcards right -> valid' do
1031
+ # /valid/wildCombination_validSubSpecSubSpec.json
1032
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1033
+ end
1034
+
1035
+ it '&& one wildcard between uppercase chars -> valid' do
1036
+ # /valid/wildCombination_validSubSpecSubSpec.json
1037
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a}{$b|$c}', trace: true, reporter: reporter)
1038
+ end
1039
+
1040
+ it '&& one wildcard left and two lowercase chars -> valid' do
1041
+ # /valid/wildCombination_validSubSpecSubSpec.json
1042
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\!}', trace: true, reporter: reporter)
1043
+ end
1044
+
1045
+ it '&& one wildcard left two uppercase chars -> valid' do
1046
+ # /valid/wildCombination_validSubSpecSubSpec.json
1047
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a|$b}{$c}', trace: true, reporter: reporter)
1048
+ end
1049
+
1050
+ it '&& one wildcard left with two digits -> valid' do
1051
+ # /valid/wildCombination_validSubSpecSubSpec.json
1052
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{?$a}', trace: true, reporter: reporter)
1053
+ end
1054
+
1055
+ it '&& two digits wildcard right -> valid' do
1056
+ # /valid/wildCombination_validSubSpecSubSpec.json
1057
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a=$b}', trace: true, reporter: reporter)
1058
+ end
1059
+
1060
+ it '&& two wildcards and one lowercase char right -> valid' do
1061
+ # /valid/wildCombination_validSubSpecSubSpec.json
1062
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a~\\test\\}}', trace: true, reporter: reporter)
1063
+ end
1064
+
1065
+ it '&& two wildcards left one uppercase char -> valid' do
1066
+ # /valid/wildCombination_validSubSpecSubSpec.json
1067
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{/#=\\/}', trace: true, reporter: reporter)
1068
+ end
1069
+
1070
+ it '&& two wildcards left with digit -> valid' do
1071
+ # /valid/wildCombination_validSubSpecSubSpec.json
1072
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{$a}', trace: true, reporter: reporter)
1073
+ end
1074
+
1075
+ it '&& wildcard between digits -> valid' do
1076
+ # /valid/wildCombination_validSubSpecSubSpec.json
1077
+ expect(parser.marc_spec).to parse('...{$a}{$b|$c}{!$a}', trace: true, reporter: reporter)
1078
+ end
1079
+
1080
+ end
1081
+
1082
+ describe 'one uppercase char two wildcards right' do
1083
+
1084
+ it '&& all digits -> valid' do
1085
+ # /valid/wildCombination_validSubSpecSubSpec.json
1086
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\Poe}', trace: true, reporter: reporter)
1087
+ end
1088
+
1089
+ it '&& all lowercase chars -> valid' do
1090
+ # /valid/wildCombination_validSubSpecSubSpec.json
1091
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\{}', trace: true, reporter: reporter)
1092
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\~}', trace: true, reporter: reporter)
1093
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\?}', trace: true, reporter: reporter)
1094
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\|}', trace: true, reporter: reporter)
1095
+ end
1096
+
1097
+ it '&& all uppercase chars special leader -> valid' do
1098
+ # /valid/wildCombination_validSubSpecSubSpec.json
1099
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a!~\\Poe}', trace: true, reporter: reporter)
1100
+ end
1101
+
1102
+ it '&& all wildcards -> valid' do
1103
+ # /valid/wildCombination_validSubSpecSubSpec.json
1104
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{245$a}', trace: true, reporter: reporter)
1105
+ end
1106
+
1107
+ it '&& mix one lowercase char and two digits -> valid' do
1108
+ # /valid/wildCombination_validSubSpecSubSpec.json
1109
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a|$b|$c}', trace: true, reporter: reporter)
1110
+ end
1111
+
1112
+ it '&& mix two lowercase chars and one digit -> valid' do
1113
+ # /valid/wildCombination_validSubSpecSubSpec.json
1114
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\$}', trace: true, reporter: reporter)
1115
+ end
1116
+
1117
+ it '&& one digit two wildcards right -> valid' do
1118
+ # /valid/wildCombination_validSubSpecSubSpec.json
1119
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a!=$b}', trace: true, reporter: reporter)
1120
+ end
1121
+
1122
+ it '&& one lowercase and two wildcards right -> valid' do
1123
+ # /valid/wildCombination_validSubSpecSubSpec.json
1124
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\=}', trace: true, reporter: reporter)
1125
+ end
1126
+
1127
+ it '&& one uppercase char two wildcards right -> valid' do
1128
+ # /valid/wildCombination_validSubSpecSubSpec.json
1129
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1130
+ end
1131
+
1132
+ it '&& one wildcard between uppercase chars -> valid' do
1133
+ # /valid/wildCombination_validSubSpecSubSpec.json
1134
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a}{$b|$c}', trace: true, reporter: reporter)
1135
+ end
1136
+
1137
+ it '&& one wildcard left and two lowercase chars -> valid' do
1138
+ # /valid/wildCombination_validSubSpecSubSpec.json
1139
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\!}', trace: true, reporter: reporter)
1140
+ end
1141
+
1142
+ it '&& one wildcard left two uppercase chars -> valid' do
1143
+ # /valid/wildCombination_validSubSpecSubSpec.json
1144
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a|$b}{$c}', trace: true, reporter: reporter)
1145
+ end
1146
+
1147
+ it '&& one wildcard left with two digits -> valid' do
1148
+ # /valid/wildCombination_validSubSpecSubSpec.json
1149
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{?$a}', trace: true, reporter: reporter)
1150
+ end
1151
+
1152
+ it '&& two digits wildcard right -> valid' do
1153
+ # /valid/wildCombination_validSubSpecSubSpec.json
1154
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a=$b}', trace: true, reporter: reporter)
1155
+ end
1156
+
1157
+ it '&& two wildcards and one lowercase char right -> valid' do
1158
+ # /valid/wildCombination_validSubSpecSubSpec.json
1159
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a~\\test\\}}', trace: true, reporter: reporter)
1160
+ end
1161
+
1162
+ it '&& two wildcards left one uppercase char -> valid' do
1163
+ # /valid/wildCombination_validSubSpecSubSpec.json
1164
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{/#=\\/}', trace: true, reporter: reporter)
1165
+ end
1166
+
1167
+ it '&& two wildcards left with digit -> valid' do
1168
+ # /valid/wildCombination_validSubSpecSubSpec.json
1169
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{$a}', trace: true, reporter: reporter)
1170
+ end
1171
+
1172
+ it '&& wildcard between digits -> valid' do
1173
+ # /valid/wildCombination_validSubSpecSubSpec.json
1174
+ expect(parser.marc_spec).to parse('...{$a|$b}{$c|$d}{!$a}', trace: true, reporter: reporter)
1175
+ end
1176
+
1177
+ end
1178
+
1179
+ describe 'mix one lowercase char and two digits' do
1180
+
1181
+ it '&& all digits -> valid' do
1182
+ # /valid/wildCombination_validSubSpecSubSpec.json
1183
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\Poe}', trace: true, reporter: reporter)
1184
+ end
1185
+
1186
+ it '&& all lowercase chars -> valid' do
1187
+ # /valid/wildCombination_validSubSpecSubSpec.json
1188
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\{}', trace: true, reporter: reporter)
1189
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\~}', trace: true, reporter: reporter)
1190
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\?}', trace: true, reporter: reporter)
1191
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\|}', trace: true, reporter: reporter)
1192
+ end
1193
+
1194
+ it '&& all uppercase chars special leader -> valid' do
1195
+ # /valid/wildCombination_validSubSpecSubSpec.json
1196
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a!~\\Poe}', trace: true, reporter: reporter)
1197
+ end
1198
+
1199
+ it '&& all wildcards -> valid' do
1200
+ # /valid/wildCombination_validSubSpecSubSpec.json
1201
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{245$a}', trace: true, reporter: reporter)
1202
+ end
1203
+
1204
+ it '&& mix one lowercase char and two digits -> valid' do
1205
+ # /valid/wildCombination_validSubSpecSubSpec.json
1206
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a|$b|$c}', trace: true, reporter: reporter)
1207
+ end
1208
+
1209
+ it '&& mix two lowercase chars and one digit -> valid' do
1210
+ # /valid/wildCombination_validSubSpecSubSpec.json
1211
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\$}', trace: true, reporter: reporter)
1212
+ end
1213
+
1214
+ it '&& one digit two wildcards right -> valid' do
1215
+ # /valid/wildCombination_validSubSpecSubSpec.json
1216
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a!=$b}', trace: true, reporter: reporter)
1217
+ end
1218
+
1219
+ it '&& one lowercase and two wildcards right -> valid' do
1220
+ # /valid/wildCombination_validSubSpecSubSpec.json
1221
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\=}', trace: true, reporter: reporter)
1222
+ end
1223
+
1224
+ it '&& one uppercase char two wildcards right -> valid' do
1225
+ # /valid/wildCombination_validSubSpecSubSpec.json
1226
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1227
+ end
1228
+
1229
+ it '&& one wildcard between uppercase chars -> valid' do
1230
+ # /valid/wildCombination_validSubSpecSubSpec.json
1231
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a}{$b|$c}', trace: true, reporter: reporter)
1232
+ end
1233
+
1234
+ it '&& one wildcard left and two lowercase chars -> valid' do
1235
+ # /valid/wildCombination_validSubSpecSubSpec.json
1236
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\!}', trace: true, reporter: reporter)
1237
+ end
1238
+
1239
+ it '&& one wildcard left two uppercase chars -> valid' do
1240
+ # /valid/wildCombination_validSubSpecSubSpec.json
1241
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a|$b}{$c}', trace: true, reporter: reporter)
1242
+ end
1243
+
1244
+ it '&& one wildcard left with two digits -> valid' do
1245
+ # /valid/wildCombination_validSubSpecSubSpec.json
1246
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{?$a}', trace: true, reporter: reporter)
1247
+ end
1248
+
1249
+ it '&& two digits wildcard right -> valid' do
1250
+ # /valid/wildCombination_validSubSpecSubSpec.json
1251
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a=$b}', trace: true, reporter: reporter)
1252
+ end
1253
+
1254
+ it '&& two wildcards and one lowercase char right -> valid' do
1255
+ # /valid/wildCombination_validSubSpecSubSpec.json
1256
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a~\\test\\}}', trace: true, reporter: reporter)
1257
+ end
1258
+
1259
+ it '&& two wildcards left one uppercase char -> valid' do
1260
+ # /valid/wildCombination_validSubSpecSubSpec.json
1261
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{/#=\\/}', trace: true, reporter: reporter)
1262
+ end
1263
+
1264
+ it '&& two wildcards left with digit -> valid' do
1265
+ # /valid/wildCombination_validSubSpecSubSpec.json
1266
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{$a}', trace: true, reporter: reporter)
1267
+ end
1268
+
1269
+ it '&& wildcard between digits -> valid' do
1270
+ # /valid/wildCombination_validSubSpecSubSpec.json
1271
+ expect(parser.marc_spec).to parse('...{$a|$b|$c}{!$a}', trace: true, reporter: reporter)
1272
+ end
1273
+
1274
+ end
1275
+
1276
+ describe 'mix two lowercase chars and one digit' do
1277
+
1278
+ it '&& all digits -> valid' do
1279
+ # /valid/wildCombination_validSubSpecSubSpec.json
1280
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\Poe}', trace: true, reporter: reporter)
1281
+ end
1282
+
1283
+ it '&& all lowercase chars -> valid' do
1284
+ # /valid/wildCombination_validSubSpecSubSpec.json
1285
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\{}', trace: true, reporter: reporter)
1286
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\~}', trace: true, reporter: reporter)
1287
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\?}', trace: true, reporter: reporter)
1288
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\|}', trace: true, reporter: reporter)
1289
+ end
1290
+
1291
+ it '&& all uppercase chars special leader -> valid' do
1292
+ # /valid/wildCombination_validSubSpecSubSpec.json
1293
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a!~\\Poe}', trace: true, reporter: reporter)
1294
+ end
1295
+
1296
+ it '&& all wildcards -> valid' do
1297
+ # /valid/wildCombination_validSubSpecSubSpec.json
1298
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{245$a}', trace: true, reporter: reporter)
1299
+ end
1300
+
1301
+ it '&& mix one lowercase char and two digits -> valid' do
1302
+ # /valid/wildCombination_validSubSpecSubSpec.json
1303
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a|$b|$c}', trace: true, reporter: reporter)
1304
+ end
1305
+
1306
+ it '&& mix two lowercase chars and one digit -> valid' do
1307
+ # /valid/wildCombination_validSubSpecSubSpec.json
1308
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\$}', trace: true, reporter: reporter)
1309
+ end
1310
+
1311
+ it '&& one digit two wildcards right -> valid' do
1312
+ # /valid/wildCombination_validSubSpecSubSpec.json
1313
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a!=$b}', trace: true, reporter: reporter)
1314
+ end
1315
+
1316
+ it '&& one lowercase and two wildcards right -> valid' do
1317
+ # /valid/wildCombination_validSubSpecSubSpec.json
1318
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\=}', trace: true, reporter: reporter)
1319
+ end
1320
+
1321
+ it '&& one uppercase char two wildcards right -> valid' do
1322
+ # /valid/wildCombination_validSubSpecSubSpec.json
1323
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1324
+ end
1325
+
1326
+ it '&& one wildcard between uppercase chars -> valid' do
1327
+ # /valid/wildCombination_validSubSpecSubSpec.json
1328
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a}{$b|$c}', trace: true, reporter: reporter)
1329
+ end
1330
+
1331
+ it '&& one wildcard left and two lowercase chars -> valid' do
1332
+ # /valid/wildCombination_validSubSpecSubSpec.json
1333
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\!}', trace: true, reporter: reporter)
1334
+ end
1335
+
1336
+ it '&& one wildcard left two uppercase chars -> valid' do
1337
+ # /valid/wildCombination_validSubSpecSubSpec.json
1338
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a|$b}{$c}', trace: true, reporter: reporter)
1339
+ end
1340
+
1341
+ it '&& one wildcard left with two digits -> valid' do
1342
+ # /valid/wildCombination_validSubSpecSubSpec.json
1343
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{?$a}', trace: true, reporter: reporter)
1344
+ end
1345
+
1346
+ it '&& two digits wildcard right -> valid' do
1347
+ # /valid/wildCombination_validSubSpecSubSpec.json
1348
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a=$b}', trace: true, reporter: reporter)
1349
+ end
1350
+
1351
+ it '&& two wildcards and one lowercase char right -> valid' do
1352
+ # /valid/wildCombination_validSubSpecSubSpec.json
1353
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a~\\test\\}}', trace: true, reporter: reporter)
1354
+ end
1355
+
1356
+ it '&& two wildcards left one uppercase char -> valid' do
1357
+ # /valid/wildCombination_validSubSpecSubSpec.json
1358
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{/#=\\/}', trace: true, reporter: reporter)
1359
+ end
1360
+
1361
+ it '&& two wildcards left with digit -> valid' do
1362
+ # /valid/wildCombination_validSubSpecSubSpec.json
1363
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{$a}', trace: true, reporter: reporter)
1364
+ end
1365
+
1366
+ it '&& wildcard between digits -> valid' do
1367
+ # /valid/wildCombination_validSubSpecSubSpec.json
1368
+ expect(parser.marc_spec).to parse('...{$a~\\test\\$}{!$a}', trace: true, reporter: reporter)
1369
+ end
1370
+
1371
+ end
1372
+
1373
+ describe 'all lowercase chars' do
1374
+
1375
+ it '&& all digits -> valid' do
1376
+ # /valid/wildCombination_validSubSpecSubSpec.json
1377
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\Poe}', trace: true, reporter: reporter)
1378
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\Poe}', trace: true, reporter: reporter)
1379
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\Poe}', trace: true, reporter: reporter)
1380
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\Poe}', trace: true, reporter: reporter)
1381
+ end
1382
+
1383
+ it '&& all lowercase chars -> valid' do
1384
+ # /valid/wildCombination_validSubSpecSubSpec.json
1385
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\{}', trace: true, reporter: reporter)
1386
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\~}', trace: true, reporter: reporter)
1387
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\?}', trace: true, reporter: reporter)
1388
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\|}', trace: true, reporter: reporter)
1389
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\{}', trace: true, reporter: reporter)
1390
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\~}', trace: true, reporter: reporter)
1391
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\?}', trace: true, reporter: reporter)
1392
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\|}', trace: true, reporter: reporter)
1393
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\{}', trace: true, reporter: reporter)
1394
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\~}', trace: true, reporter: reporter)
1395
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\?}', trace: true, reporter: reporter)
1396
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\|}', trace: true, reporter: reporter)
1397
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\{}', trace: true, reporter: reporter)
1398
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\~}', trace: true, reporter: reporter)
1399
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\?}', trace: true, reporter: reporter)
1400
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\|}', trace: true, reporter: reporter)
1401
+ end
1402
+
1403
+ it '&& all uppercase chars special leader -> valid' do
1404
+ # /valid/wildCombination_validSubSpecSubSpec.json
1405
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a!~\\Poe}', trace: true, reporter: reporter)
1406
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a!~\\Poe}', trace: true, reporter: reporter)
1407
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a!~\\Poe}', trace: true, reporter: reporter)
1408
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a!~\\Poe}', trace: true, reporter: reporter)
1409
+ end
1410
+
1411
+ it '&& all wildcards -> valid' do
1412
+ # /valid/wildCombination_validSubSpecSubSpec.json
1413
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{245$a}', trace: true, reporter: reporter)
1414
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{245$a}', trace: true, reporter: reporter)
1415
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{245$a}', trace: true, reporter: reporter)
1416
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{245$a}', trace: true, reporter: reporter)
1417
+ end
1418
+
1419
+ it '&& mix one lowercase char and two digits -> valid' do
1420
+ # /valid/wildCombination_validSubSpecSubSpec.json
1421
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a|$b|$c}', trace: true, reporter: reporter)
1422
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a|$b|$c}', trace: true, reporter: reporter)
1423
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a|$b|$c}', trace: true, reporter: reporter)
1424
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a|$b|$c}', trace: true, reporter: reporter)
1425
+ end
1426
+
1427
+ it '&& mix two lowercase chars and one digit -> valid' do
1428
+ # /valid/wildCombination_validSubSpecSubSpec.json
1429
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\$}', trace: true, reporter: reporter)
1430
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\$}', trace: true, reporter: reporter)
1431
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\$}', trace: true, reporter: reporter)
1432
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\$}', trace: true, reporter: reporter)
1433
+ end
1434
+
1435
+ it '&& one digit two wildcards right -> valid' do
1436
+ # /valid/wildCombination_validSubSpecSubSpec.json
1437
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a!=$b}', trace: true, reporter: reporter)
1438
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a!=$b}', trace: true, reporter: reporter)
1439
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a!=$b}', trace: true, reporter: reporter)
1440
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a!=$b}', trace: true, reporter: reporter)
1441
+ end
1442
+
1443
+ it '&& one lowercase and two wildcards right -> valid' do
1444
+ # /valid/wildCombination_validSubSpecSubSpec.json
1445
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\=}', trace: true, reporter: reporter)
1446
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\=}', trace: true, reporter: reporter)
1447
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\=}', trace: true, reporter: reporter)
1448
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\=}', trace: true, reporter: reporter)
1449
+ end
1450
+
1451
+ it '&& one uppercase char two wildcards right -> valid' do
1452
+ # /valid/wildCombination_validSubSpecSubSpec.json
1453
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1454
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1455
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1456
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1457
+ end
1458
+
1459
+ it '&& one wildcard between uppercase chars -> valid' do
1460
+ # /valid/wildCombination_validSubSpecSubSpec.json
1461
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a}{$b|$c}', trace: true, reporter: reporter)
1462
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a}{$b|$c}', trace: true, reporter: reporter)
1463
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a}{$b|$c}', trace: true, reporter: reporter)
1464
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a}{$b|$c}', trace: true, reporter: reporter)
1465
+ end
1466
+
1467
+ it '&& one wildcard left and two lowercase chars -> valid' do
1468
+ # /valid/wildCombination_validSubSpecSubSpec.json
1469
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\!}', trace: true, reporter: reporter)
1470
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\!}', trace: true, reporter: reporter)
1471
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\!}', trace: true, reporter: reporter)
1472
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\!}', trace: true, reporter: reporter)
1473
+ end
1474
+
1475
+ it '&& one wildcard left two uppercase chars -> valid' do
1476
+ # /valid/wildCombination_validSubSpecSubSpec.json
1477
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a|$b}{$c}', trace: true, reporter: reporter)
1478
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a|$b}{$c}', trace: true, reporter: reporter)
1479
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a|$b}{$c}', trace: true, reporter: reporter)
1480
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a|$b}{$c}', trace: true, reporter: reporter)
1481
+ end
1482
+
1483
+ it '&& one wildcard left with two digits -> valid' do
1484
+ # /valid/wildCombination_validSubSpecSubSpec.json
1485
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{?$a}', trace: true, reporter: reporter)
1486
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{?$a}', trace: true, reporter: reporter)
1487
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{?$a}', trace: true, reporter: reporter)
1488
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{?$a}', trace: true, reporter: reporter)
1489
+ end
1490
+
1491
+ it '&& two digits wildcard right -> valid' do
1492
+ # /valid/wildCombination_validSubSpecSubSpec.json
1493
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a=$b}', trace: true, reporter: reporter)
1494
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a=$b}', trace: true, reporter: reporter)
1495
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a=$b}', trace: true, reporter: reporter)
1496
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a=$b}', trace: true, reporter: reporter)
1497
+ end
1498
+
1499
+ it '&& two wildcards and one lowercase char right -> valid' do
1500
+ # /valid/wildCombination_validSubSpecSubSpec.json
1501
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a~\\test\\}}', trace: true, reporter: reporter)
1502
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a~\\test\\}}', trace: true, reporter: reporter)
1503
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a~\\test\\}}', trace: true, reporter: reporter)
1504
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a~\\test\\}}', trace: true, reporter: reporter)
1505
+ end
1506
+
1507
+ it '&& two wildcards left one uppercase char -> valid' do
1508
+ # /valid/wildCombination_validSubSpecSubSpec.json
1509
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{/#=\\/}', trace: true, reporter: reporter)
1510
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{/#=\\/}', trace: true, reporter: reporter)
1511
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{/#=\\/}', trace: true, reporter: reporter)
1512
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{/#=\\/}', trace: true, reporter: reporter)
1513
+ end
1514
+
1515
+ it '&& two wildcards left with digit -> valid' do
1516
+ # /valid/wildCombination_validSubSpecSubSpec.json
1517
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{$a}', trace: true, reporter: reporter)
1518
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{$a}', trace: true, reporter: reporter)
1519
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{$a}', trace: true, reporter: reporter)
1520
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{$a}', trace: true, reporter: reporter)
1521
+ end
1522
+
1523
+ it '&& wildcard between digits -> valid' do
1524
+ # /valid/wildCombination_validSubSpecSubSpec.json
1525
+ expect(parser.marc_spec).to parse('...{$a~\\test\\{}{!$a}', trace: true, reporter: reporter)
1526
+ expect(parser.marc_spec).to parse('...{$a~\\test\\~}{!$a}', trace: true, reporter: reporter)
1527
+ expect(parser.marc_spec).to parse('...{$a~\\test\\?}{!$a}', trace: true, reporter: reporter)
1528
+ expect(parser.marc_spec).to parse('...{$a~\\test\\|}{!$a}', trace: true, reporter: reporter)
1529
+ end
1530
+
1531
+ end
1532
+
1533
+ describe 'two wildcards and one lowercase char right' do
1534
+
1535
+ it '&& all digits -> valid' do
1536
+ # /valid/wildCombination_validSubSpecSubSpec.json
1537
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\Poe}', trace: true, reporter: reporter)
1538
+ end
1539
+
1540
+ it '&& all lowercase chars -> valid' do
1541
+ # /valid/wildCombination_validSubSpecSubSpec.json
1542
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\{}', trace: true, reporter: reporter)
1543
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\~}', trace: true, reporter: reporter)
1544
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\?}', trace: true, reporter: reporter)
1545
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\|}', trace: true, reporter: reporter)
1546
+ end
1547
+
1548
+ it '&& all uppercase chars special leader -> valid' do
1549
+ # /valid/wildCombination_validSubSpecSubSpec.json
1550
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a!~\\Poe}', trace: true, reporter: reporter)
1551
+ end
1552
+
1553
+ it '&& all wildcards -> valid' do
1554
+ # /valid/wildCombination_validSubSpecSubSpec.json
1555
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{245$a}', trace: true, reporter: reporter)
1556
+ end
1557
+
1558
+ it '&& mix one lowercase char and two digits -> valid' do
1559
+ # /valid/wildCombination_validSubSpecSubSpec.json
1560
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a|$b|$c}', trace: true, reporter: reporter)
1561
+ end
1562
+
1563
+ it '&& mix two lowercase chars and one digit -> valid' do
1564
+ # /valid/wildCombination_validSubSpecSubSpec.json
1565
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\$}', trace: true, reporter: reporter)
1566
+ end
1567
+
1568
+ it '&& one digit two wildcards right -> valid' do
1569
+ # /valid/wildCombination_validSubSpecSubSpec.json
1570
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a!=$b}', trace: true, reporter: reporter)
1571
+ end
1572
+
1573
+ it '&& one lowercase and two wildcards right -> valid' do
1574
+ # /valid/wildCombination_validSubSpecSubSpec.json
1575
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\=}', trace: true, reporter: reporter)
1576
+ end
1577
+
1578
+ it '&& one uppercase char two wildcards right -> valid' do
1579
+ # /valid/wildCombination_validSubSpecSubSpec.json
1580
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1581
+ end
1582
+
1583
+ it '&& one wildcard between uppercase chars -> valid' do
1584
+ # /valid/wildCombination_validSubSpecSubSpec.json
1585
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a}{$b|$c}', trace: true, reporter: reporter)
1586
+ end
1587
+
1588
+ it '&& one wildcard left and two lowercase chars -> valid' do
1589
+ # /valid/wildCombination_validSubSpecSubSpec.json
1590
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\!}', trace: true, reporter: reporter)
1591
+ end
1592
+
1593
+ it '&& one wildcard left two uppercase chars -> valid' do
1594
+ # /valid/wildCombination_validSubSpecSubSpec.json
1595
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a|$b}{$c}', trace: true, reporter: reporter)
1596
+ end
1597
+
1598
+ it '&& one wildcard left with two digits -> valid' do
1599
+ # /valid/wildCombination_validSubSpecSubSpec.json
1600
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{?$a}', trace: true, reporter: reporter)
1601
+ end
1602
+
1603
+ it '&& two digits wildcard right -> valid' do
1604
+ # /valid/wildCombination_validSubSpecSubSpec.json
1605
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a=$b}', trace: true, reporter: reporter)
1606
+ end
1607
+
1608
+ it '&& two wildcards and one lowercase char right -> valid' do
1609
+ # /valid/wildCombination_validSubSpecSubSpec.json
1610
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a~\\test\\}}', trace: true, reporter: reporter)
1611
+ end
1612
+
1613
+ it '&& two wildcards left one uppercase char -> valid' do
1614
+ # /valid/wildCombination_validSubSpecSubSpec.json
1615
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{/#=\\/}', trace: true, reporter: reporter)
1616
+ end
1617
+
1618
+ it '&& two wildcards left with digit -> valid' do
1619
+ # /valid/wildCombination_validSubSpecSubSpec.json
1620
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{$a}', trace: true, reporter: reporter)
1621
+ end
1622
+
1623
+ it '&& wildcard between digits -> valid' do
1624
+ # /valid/wildCombination_validSubSpecSubSpec.json
1625
+ expect(parser.marc_spec).to parse('...{$a~\\test\\}}{!$a}', trace: true, reporter: reporter)
1626
+ end
1627
+
1628
+ end
1629
+
1630
+ describe 'one wildcard left and two lowercase chars' do
1631
+
1632
+ it '&& all digits -> valid' do
1633
+ # /valid/wildCombination_validSubSpecSubSpec.json
1634
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\Poe}', trace: true, reporter: reporter)
1635
+ end
1636
+
1637
+ it '&& all lowercase chars -> valid' do
1638
+ # /valid/wildCombination_validSubSpecSubSpec.json
1639
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\{}', trace: true, reporter: reporter)
1640
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\~}', trace: true, reporter: reporter)
1641
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\?}', trace: true, reporter: reporter)
1642
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\|}', trace: true, reporter: reporter)
1643
+ end
1644
+
1645
+ it '&& all uppercase chars special leader -> valid' do
1646
+ # /valid/wildCombination_validSubSpecSubSpec.json
1647
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a!~\\Poe}', trace: true, reporter: reporter)
1648
+ end
1649
+
1650
+ it '&& all wildcards -> valid' do
1651
+ # /valid/wildCombination_validSubSpecSubSpec.json
1652
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{245$a}', trace: true, reporter: reporter)
1653
+ end
1654
+
1655
+ it '&& mix one lowercase char and two digits -> valid' do
1656
+ # /valid/wildCombination_validSubSpecSubSpec.json
1657
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a|$b|$c}', trace: true, reporter: reporter)
1658
+ end
1659
+
1660
+ it '&& mix two lowercase chars and one digit -> valid' do
1661
+ # /valid/wildCombination_validSubSpecSubSpec.json
1662
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\$}', trace: true, reporter: reporter)
1663
+ end
1664
+
1665
+ it '&& one digit two wildcards right -> valid' do
1666
+ # /valid/wildCombination_validSubSpecSubSpec.json
1667
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a!=$b}', trace: true, reporter: reporter)
1668
+ end
1669
+
1670
+ it '&& one lowercase and two wildcards right -> valid' do
1671
+ # /valid/wildCombination_validSubSpecSubSpec.json
1672
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\=}', trace: true, reporter: reporter)
1673
+ end
1674
+
1675
+ it '&& one uppercase char two wildcards right -> valid' do
1676
+ # /valid/wildCombination_validSubSpecSubSpec.json
1677
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1678
+ end
1679
+
1680
+ it '&& one wildcard between uppercase chars -> valid' do
1681
+ # /valid/wildCombination_validSubSpecSubSpec.json
1682
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a}{$b|$c}', trace: true, reporter: reporter)
1683
+ end
1684
+
1685
+ it '&& one wildcard left and two lowercase chars -> valid' do
1686
+ # /valid/wildCombination_validSubSpecSubSpec.json
1687
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\!}', trace: true, reporter: reporter)
1688
+ end
1689
+
1690
+ it '&& one wildcard left two uppercase chars -> valid' do
1691
+ # /valid/wildCombination_validSubSpecSubSpec.json
1692
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a|$b}{$c}', trace: true, reporter: reporter)
1693
+ end
1694
+
1695
+ it '&& one wildcard left with two digits -> valid' do
1696
+ # /valid/wildCombination_validSubSpecSubSpec.json
1697
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{?$a}', trace: true, reporter: reporter)
1698
+ end
1699
+
1700
+ it '&& two digits wildcard right -> valid' do
1701
+ # /valid/wildCombination_validSubSpecSubSpec.json
1702
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a=$b}', trace: true, reporter: reporter)
1703
+ end
1704
+
1705
+ it '&& two wildcards and one lowercase char right -> valid' do
1706
+ # /valid/wildCombination_validSubSpecSubSpec.json
1707
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a~\\test\\}}', trace: true, reporter: reporter)
1708
+ end
1709
+
1710
+ it '&& two wildcards left one uppercase char -> valid' do
1711
+ # /valid/wildCombination_validSubSpecSubSpec.json
1712
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{/#=\\/}', trace: true, reporter: reporter)
1713
+ end
1714
+
1715
+ it '&& two wildcards left with digit -> valid' do
1716
+ # /valid/wildCombination_validSubSpecSubSpec.json
1717
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{$a}', trace: true, reporter: reporter)
1718
+ end
1719
+
1720
+ it '&& wildcard between digits -> valid' do
1721
+ # /valid/wildCombination_validSubSpecSubSpec.json
1722
+ expect(parser.marc_spec).to parse('...{$a~\\test\\!}{!$a}', trace: true, reporter: reporter)
1723
+ end
1724
+
1725
+ end
1726
+
1727
+ describe 'one lowercase and two wildcards right' do
1728
+
1729
+ it '&& all digits -> valid' do
1730
+ # /valid/wildCombination_validSubSpecSubSpec.json
1731
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\Poe}', trace: true, reporter: reporter)
1732
+ end
1733
+
1734
+ it '&& all lowercase chars -> valid' do
1735
+ # /valid/wildCombination_validSubSpecSubSpec.json
1736
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\{}', trace: true, reporter: reporter)
1737
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\~}', trace: true, reporter: reporter)
1738
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\?}', trace: true, reporter: reporter)
1739
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\|}', trace: true, reporter: reporter)
1740
+ end
1741
+
1742
+ it '&& all uppercase chars special leader -> valid' do
1743
+ # /valid/wildCombination_validSubSpecSubSpec.json
1744
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a!~\\Poe}', trace: true, reporter: reporter)
1745
+ end
1746
+
1747
+ it '&& all wildcards -> valid' do
1748
+ # /valid/wildCombination_validSubSpecSubSpec.json
1749
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{245$a}', trace: true, reporter: reporter)
1750
+ end
1751
+
1752
+ it '&& mix one lowercase char and two digits -> valid' do
1753
+ # /valid/wildCombination_validSubSpecSubSpec.json
1754
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a|$b|$c}', trace: true, reporter: reporter)
1755
+ end
1756
+
1757
+ it '&& mix two lowercase chars and one digit -> valid' do
1758
+ # /valid/wildCombination_validSubSpecSubSpec.json
1759
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\$}', trace: true, reporter: reporter)
1760
+ end
1761
+
1762
+ it '&& one digit two wildcards right -> valid' do
1763
+ # /valid/wildCombination_validSubSpecSubSpec.json
1764
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a!=$b}', trace: true, reporter: reporter)
1765
+ end
1766
+
1767
+ it '&& one lowercase and two wildcards right -> valid' do
1768
+ # /valid/wildCombination_validSubSpecSubSpec.json
1769
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\=}', trace: true, reporter: reporter)
1770
+ end
1771
+
1772
+ it '&& one uppercase char two wildcards right -> valid' do
1773
+ # /valid/wildCombination_validSubSpecSubSpec.json
1774
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1775
+ end
1776
+
1777
+ it '&& one wildcard between uppercase chars -> valid' do
1778
+ # /valid/wildCombination_validSubSpecSubSpec.json
1779
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a}{$b|$c}', trace: true, reporter: reporter)
1780
+ end
1781
+
1782
+ it '&& one wildcard left and two lowercase chars -> valid' do
1783
+ # /valid/wildCombination_validSubSpecSubSpec.json
1784
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\!}', trace: true, reporter: reporter)
1785
+ end
1786
+
1787
+ it '&& one wildcard left two uppercase chars -> valid' do
1788
+ # /valid/wildCombination_validSubSpecSubSpec.json
1789
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a|$b}{$c}', trace: true, reporter: reporter)
1790
+ end
1791
+
1792
+ it '&& one wildcard left with two digits -> valid' do
1793
+ # /valid/wildCombination_validSubSpecSubSpec.json
1794
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{?$a}', trace: true, reporter: reporter)
1795
+ end
1796
+
1797
+ it '&& two digits wildcard right -> valid' do
1798
+ # /valid/wildCombination_validSubSpecSubSpec.json
1799
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a=$b}', trace: true, reporter: reporter)
1800
+ end
1801
+
1802
+ it '&& two wildcards and one lowercase char right -> valid' do
1803
+ # /valid/wildCombination_validSubSpecSubSpec.json
1804
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a~\\test\\}}', trace: true, reporter: reporter)
1805
+ end
1806
+
1807
+ it '&& two wildcards left one uppercase char -> valid' do
1808
+ # /valid/wildCombination_validSubSpecSubSpec.json
1809
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{/#=\\/}', trace: true, reporter: reporter)
1810
+ end
1811
+
1812
+ it '&& two wildcards left with digit -> valid' do
1813
+ # /valid/wildCombination_validSubSpecSubSpec.json
1814
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{$a}', trace: true, reporter: reporter)
1815
+ end
1816
+
1817
+ it '&& wildcard between digits -> valid' do
1818
+ # /valid/wildCombination_validSubSpecSubSpec.json
1819
+ expect(parser.marc_spec).to parse('...{$a~\\test\\=}{!$a}', trace: true, reporter: reporter)
1820
+ end
1821
+
1822
+ end
1823
+
1824
+ end
1825
+ end
1826
+ end
1827
+ end
1828
+ end
1829
+ end