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,3216 @@
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 :subfield_tag_sub_spec do
9
+ let(:parser) { Parser.new }
10
+ let(:reporter) { Parslet::ErrorReporter::Deepest.new }
11
+
12
+ describe 'marc_spec: valid field tag, subfield tag and subspec' do
13
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
14
+ it 'subfieldtag & && all digits -> valid' do
15
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
16
+ expect(parser.marc_spec).to parse('...$&{$a~\\Poe}', trace: true, reporter: reporter)
17
+ end
18
+
19
+ it 'subfieldtag & && all lowercase chars -> valid' do
20
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
21
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\{}', trace: true, reporter: reporter)
22
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\~}', trace: true, reporter: reporter)
23
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\?}', trace: true, reporter: reporter)
24
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\|}', trace: true, reporter: reporter)
25
+ end
26
+
27
+ it 'subfieldtag & && all uppercase chars special leader -> valid' do
28
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
29
+ expect(parser.marc_spec).to parse('...$&{$a!~\\Poe}', trace: true, reporter: reporter)
30
+ end
31
+
32
+ it 'subfieldtag & && all wildcards -> valid' do
33
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
34
+ expect(parser.marc_spec).to parse('...$&{245$a}', trace: true, reporter: reporter)
35
+ end
36
+
37
+ it 'subfieldtag & && mix one lowercase char and two digits -> valid' do
38
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
39
+ expect(parser.marc_spec).to parse('...$&{$a|$b|$c}', trace: true, reporter: reporter)
40
+ end
41
+
42
+ it 'subfieldtag & && mix two lowercase chars and one digit -> valid' do
43
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
44
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\$}', trace: true, reporter: reporter)
45
+ end
46
+
47
+ it 'subfieldtag & && one digit two wildcards right -> valid' do
48
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
49
+ expect(parser.marc_spec).to parse('...$&{$a!=$b}', trace: true, reporter: reporter)
50
+ end
51
+
52
+ it 'subfieldtag & && one lowercase and two wildcards right -> valid' do
53
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
54
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\=}', trace: true, reporter: reporter)
55
+ end
56
+
57
+ it 'subfieldtag & && one uppercase char two wildcards right -> valid' do
58
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
59
+ expect(parser.marc_spec).to parse('...$&{$a|$b}{$c|$d}', trace: true, reporter: reporter)
60
+ end
61
+
62
+ it 'subfieldtag & && one wildcard between uppercase chars -> valid' do
63
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
64
+ expect(parser.marc_spec).to parse('...$&{$a}{$b|$c}', trace: true, reporter: reporter)
65
+ end
66
+
67
+ it 'subfieldtag & && one wildcard left and two lowercase chars -> valid' do
68
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
69
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\!}', trace: true, reporter: reporter)
70
+ end
71
+
72
+ it 'subfieldtag & && one wildcard left two uppercase chars -> valid' do
73
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
74
+ expect(parser.marc_spec).to parse('...$&{$a|$b}{$c}', trace: true, reporter: reporter)
75
+ end
76
+
77
+ it 'subfieldtag & && one wildcard left with two digits -> valid' do
78
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
79
+ expect(parser.marc_spec).to parse('...$&{?$a}', trace: true, reporter: reporter)
80
+ end
81
+
82
+ it 'subfieldtag & && two digits wildcard right -> valid' do
83
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
84
+ expect(parser.marc_spec).to parse('...$&{$a=$b}', trace: true, reporter: reporter)
85
+ end
86
+
87
+ it 'subfieldtag & && two wildcards and one lowercase char right -> valid' do
88
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
89
+ expect(parser.marc_spec).to parse('...$&{$a~\\test\\}}', trace: true, reporter: reporter)
90
+ end
91
+
92
+ it 'subfieldtag & && two wildcards left one uppercase char -> valid' do
93
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
94
+ expect(parser.marc_spec).to parse('...$&{/#=\\/}', trace: true, reporter: reporter)
95
+ end
96
+
97
+ it 'subfieldtag & && two wildcards left with digit -> valid' do
98
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
99
+ expect(parser.marc_spec).to parse('...$&{$a}', trace: true, reporter: reporter)
100
+ end
101
+
102
+ it 'subfieldtag & && wildcard between digits -> valid' do
103
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
104
+ expect(parser.marc_spec).to parse('...$&{!$a}', trace: true, reporter: reporter)
105
+ end
106
+
107
+ describe 'lowercase alpha subfieldtag a' do
108
+
109
+ it '&& all digits -> valid' do
110
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
111
+ expect(parser.marc_spec).to parse('...$a{$a~\\Poe}', trace: true, reporter: reporter)
112
+ end
113
+
114
+ it '&& all lowercase chars -> valid' do
115
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
116
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\{}', trace: true, reporter: reporter)
117
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\~}', trace: true, reporter: reporter)
118
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\?}', trace: true, reporter: reporter)
119
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\|}', trace: true, reporter: reporter)
120
+ end
121
+
122
+ it '&& all uppercase chars special leader -> valid' do
123
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
124
+ expect(parser.marc_spec).to parse('...$a{$a!~\\Poe}', trace: true, reporter: reporter)
125
+ end
126
+
127
+ it '&& all wildcards -> valid' do
128
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
129
+ expect(parser.marc_spec).to parse('...$a{245$a}', trace: true, reporter: reporter)
130
+ end
131
+
132
+ it '&& mix one lowercase char and two digits -> valid' do
133
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
134
+ expect(parser.marc_spec).to parse('...$a{$a|$b|$c}', trace: true, reporter: reporter)
135
+ end
136
+
137
+ it '&& mix two lowercase chars and one digit -> valid' do
138
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
139
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\$}', trace: true, reporter: reporter)
140
+ end
141
+
142
+ it '&& one digit two wildcards right -> valid' do
143
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
144
+ expect(parser.marc_spec).to parse('...$a{$a!=$b}', trace: true, reporter: reporter)
145
+ end
146
+
147
+ it '&& one lowercase and two wildcards right -> valid' do
148
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
149
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\=}', trace: true, reporter: reporter)
150
+ end
151
+
152
+ it '&& one uppercase char two wildcards right -> valid' do
153
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
154
+ expect(parser.marc_spec).to parse('...$a{$a|$b}{$c|$d}', trace: true, reporter: reporter)
155
+ end
156
+
157
+ it '&& one wildcard between uppercase chars -> valid' do
158
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
159
+ expect(parser.marc_spec).to parse('...$a{$a}{$b|$c}', trace: true, reporter: reporter)
160
+ end
161
+
162
+ it '&& one wildcard left and two lowercase chars -> valid' do
163
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
164
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\!}', trace: true, reporter: reporter)
165
+ end
166
+
167
+ it '&& one wildcard left two uppercase chars -> valid' do
168
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
169
+ expect(parser.marc_spec).to parse('...$a{$a|$b}{$c}', trace: true, reporter: reporter)
170
+ end
171
+
172
+ it '&& one wildcard left with two digits -> valid' do
173
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
174
+ expect(parser.marc_spec).to parse('...$a{?$a}', trace: true, reporter: reporter)
175
+ end
176
+
177
+ it '&& two digits wildcard right -> valid' do
178
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
179
+ expect(parser.marc_spec).to parse('...$a{$a=$b}', trace: true, reporter: reporter)
180
+ end
181
+
182
+ it '&& two wildcards and one lowercase char right -> valid' do
183
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
184
+ expect(parser.marc_spec).to parse('...$a{$a~\\test\\}}', trace: true, reporter: reporter)
185
+ end
186
+
187
+ it '&& two wildcards left one uppercase char -> valid' do
188
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
189
+ expect(parser.marc_spec).to parse('...$a{/#=\\/}', trace: true, reporter: reporter)
190
+ end
191
+
192
+ it '&& two wildcards left with digit -> valid' do
193
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
194
+ expect(parser.marc_spec).to parse('...$a{$a}', trace: true, reporter: reporter)
195
+ end
196
+
197
+ it '&& wildcard between digits -> valid' do
198
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
199
+ expect(parser.marc_spec).to parse('...$a{!$a}', trace: true, reporter: reporter)
200
+ end
201
+
202
+ end
203
+
204
+ describe 'lowercase alpha subfieldtag z' do
205
+
206
+ it '&& all digits -> valid' do
207
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
208
+ expect(parser.marc_spec).to parse('...$z{$a~\\Poe}', trace: true, reporter: reporter)
209
+ end
210
+
211
+ it '&& all lowercase chars -> valid' do
212
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
213
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\{}', trace: true, reporter: reporter)
214
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\~}', trace: true, reporter: reporter)
215
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\?}', trace: true, reporter: reporter)
216
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\|}', trace: true, reporter: reporter)
217
+ end
218
+
219
+ it '&& all uppercase chars special leader -> valid' do
220
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
221
+ expect(parser.marc_spec).to parse('...$z{$a!~\\Poe}', trace: true, reporter: reporter)
222
+ end
223
+
224
+ it '&& all wildcards -> valid' do
225
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
226
+ expect(parser.marc_spec).to parse('...$z{245$a}', trace: true, reporter: reporter)
227
+ end
228
+
229
+ it '&& mix one lowercase char and two digits -> valid' do
230
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
231
+ expect(parser.marc_spec).to parse('...$z{$a|$b|$c}', trace: true, reporter: reporter)
232
+ end
233
+
234
+ it '&& mix two lowercase chars and one digit -> valid' do
235
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
236
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\$}', trace: true, reporter: reporter)
237
+ end
238
+
239
+ it '&& one digit two wildcards right -> valid' do
240
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
241
+ expect(parser.marc_spec).to parse('...$z{$a!=$b}', trace: true, reporter: reporter)
242
+ end
243
+
244
+ it '&& one lowercase and two wildcards right -> valid' do
245
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
246
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\=}', trace: true, reporter: reporter)
247
+ end
248
+
249
+ it '&& one uppercase char two wildcards right -> valid' do
250
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
251
+ expect(parser.marc_spec).to parse('...$z{$a|$b}{$c|$d}', trace: true, reporter: reporter)
252
+ end
253
+
254
+ it '&& one wildcard between uppercase chars -> valid' do
255
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
256
+ expect(parser.marc_spec).to parse('...$z{$a}{$b|$c}', trace: true, reporter: reporter)
257
+ end
258
+
259
+ it '&& one wildcard left and two lowercase chars -> valid' do
260
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
261
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\!}', trace: true, reporter: reporter)
262
+ end
263
+
264
+ it '&& one wildcard left two uppercase chars -> valid' do
265
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
266
+ expect(parser.marc_spec).to parse('...$z{$a|$b}{$c}', trace: true, reporter: reporter)
267
+ end
268
+
269
+ it '&& one wildcard left with two digits -> valid' do
270
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
271
+ expect(parser.marc_spec).to parse('...$z{?$a}', trace: true, reporter: reporter)
272
+ end
273
+
274
+ it '&& two digits wildcard right -> valid' do
275
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
276
+ expect(parser.marc_spec).to parse('...$z{$a=$b}', trace: true, reporter: reporter)
277
+ end
278
+
279
+ it '&& two wildcards and one lowercase char right -> valid' do
280
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
281
+ expect(parser.marc_spec).to parse('...$z{$a~\\test\\}}', trace: true, reporter: reporter)
282
+ end
283
+
284
+ it '&& two wildcards left one uppercase char -> valid' do
285
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
286
+ expect(parser.marc_spec).to parse('...$z{/#=\\/}', trace: true, reporter: reporter)
287
+ end
288
+
289
+ it '&& two wildcards left with digit -> valid' do
290
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
291
+ expect(parser.marc_spec).to parse('...$z{$a}', trace: true, reporter: reporter)
292
+ end
293
+
294
+ it '&& wildcard between digits -> valid' do
295
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
296
+ expect(parser.marc_spec).to parse('...$z{!$a}', trace: true, reporter: reporter)
297
+ end
298
+
299
+ end
300
+
301
+ describe 'digit subfieldtag 0' do
302
+
303
+ it '&& all digits -> valid' do
304
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
305
+ expect(parser.marc_spec).to parse('...$0{$a~\\Poe}', trace: true, reporter: reporter)
306
+ end
307
+
308
+ it '&& all lowercase chars -> valid' do
309
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
310
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\{}', trace: true, reporter: reporter)
311
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\~}', trace: true, reporter: reporter)
312
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\?}', trace: true, reporter: reporter)
313
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\|}', trace: true, reporter: reporter)
314
+ end
315
+
316
+ it '&& all uppercase chars special leader -> valid' do
317
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
318
+ expect(parser.marc_spec).to parse('...$0{$a!~\\Poe}', trace: true, reporter: reporter)
319
+ end
320
+
321
+ it '&& all wildcards -> valid' do
322
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
323
+ expect(parser.marc_spec).to parse('...$0{245$a}', trace: true, reporter: reporter)
324
+ end
325
+
326
+ it '&& mix one lowercase char and two digits -> valid' do
327
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
328
+ expect(parser.marc_spec).to parse('...$0{$a|$b|$c}', trace: true, reporter: reporter)
329
+ end
330
+
331
+ it '&& mix two lowercase chars and one digit -> valid' do
332
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
333
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\$}', trace: true, reporter: reporter)
334
+ end
335
+
336
+ it '&& one digit two wildcards right -> valid' do
337
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
338
+ expect(parser.marc_spec).to parse('...$0{$a!=$b}', trace: true, reporter: reporter)
339
+ end
340
+
341
+ it '&& one lowercase and two wildcards right -> valid' do
342
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
343
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\=}', trace: true, reporter: reporter)
344
+ end
345
+
346
+ it '&& one uppercase char two wildcards right -> valid' do
347
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
348
+ expect(parser.marc_spec).to parse('...$0{$a|$b}{$c|$d}', trace: true, reporter: reporter)
349
+ end
350
+
351
+ it '&& one wildcard between uppercase chars -> valid' do
352
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
353
+ expect(parser.marc_spec).to parse('...$0{$a}{$b|$c}', trace: true, reporter: reporter)
354
+ end
355
+
356
+ it '&& one wildcard left and two lowercase chars -> valid' do
357
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
358
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\!}', trace: true, reporter: reporter)
359
+ end
360
+
361
+ it '&& one wildcard left two uppercase chars -> valid' do
362
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
363
+ expect(parser.marc_spec).to parse('...$0{$a|$b}{$c}', trace: true, reporter: reporter)
364
+ end
365
+
366
+ it '&& one wildcard left with two digits -> valid' do
367
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
368
+ expect(parser.marc_spec).to parse('...$0{?$a}', trace: true, reporter: reporter)
369
+ end
370
+
371
+ it '&& two digits wildcard right -> valid' do
372
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
373
+ expect(parser.marc_spec).to parse('...$0{$a=$b}', trace: true, reporter: reporter)
374
+ end
375
+
376
+ it '&& two wildcards and one lowercase char right -> valid' do
377
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
378
+ expect(parser.marc_spec).to parse('...$0{$a~\\test\\}}', trace: true, reporter: reporter)
379
+ end
380
+
381
+ it '&& two wildcards left one uppercase char -> valid' do
382
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
383
+ expect(parser.marc_spec).to parse('...$0{/#=\\/}', trace: true, reporter: reporter)
384
+ end
385
+
386
+ it '&& two wildcards left with digit -> valid' do
387
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
388
+ expect(parser.marc_spec).to parse('...$0{$a}', trace: true, reporter: reporter)
389
+ end
390
+
391
+ it '&& wildcard between digits -> valid' do
392
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
393
+ expect(parser.marc_spec).to parse('...$0{!$a}', trace: true, reporter: reporter)
394
+ end
395
+
396
+ end
397
+
398
+ describe 'digit subfieldtag 9' do
399
+
400
+ it '&& all digits -> valid' do
401
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
402
+ expect(parser.marc_spec).to parse('...$9{$a~\\Poe}', trace: true, reporter: reporter)
403
+ end
404
+
405
+ it '&& all lowercase chars -> valid' do
406
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
407
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\{}', trace: true, reporter: reporter)
408
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\~}', trace: true, reporter: reporter)
409
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\?}', trace: true, reporter: reporter)
410
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\|}', trace: true, reporter: reporter)
411
+ end
412
+
413
+ it '&& all uppercase chars special leader -> valid' do
414
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
415
+ expect(parser.marc_spec).to parse('...$9{$a!~\\Poe}', trace: true, reporter: reporter)
416
+ end
417
+
418
+ it '&& all wildcards -> valid' do
419
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
420
+ expect(parser.marc_spec).to parse('...$9{245$a}', trace: true, reporter: reporter)
421
+ end
422
+
423
+ it '&& mix one lowercase char and two digits -> valid' do
424
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
425
+ expect(parser.marc_spec).to parse('...$9{$a|$b|$c}', trace: true, reporter: reporter)
426
+ end
427
+
428
+ it '&& mix two lowercase chars and one digit -> valid' do
429
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
430
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\$}', trace: true, reporter: reporter)
431
+ end
432
+
433
+ it '&& one digit two wildcards right -> valid' do
434
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
435
+ expect(parser.marc_spec).to parse('...$9{$a!=$b}', trace: true, reporter: reporter)
436
+ end
437
+
438
+ it '&& one lowercase and two wildcards right -> valid' do
439
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
440
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\=}', trace: true, reporter: reporter)
441
+ end
442
+
443
+ it '&& one uppercase char two wildcards right -> valid' do
444
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
445
+ expect(parser.marc_spec).to parse('...$9{$a|$b}{$c|$d}', trace: true, reporter: reporter)
446
+ end
447
+
448
+ it '&& one wildcard between uppercase chars -> valid' do
449
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
450
+ expect(parser.marc_spec).to parse('...$9{$a}{$b|$c}', trace: true, reporter: reporter)
451
+ end
452
+
453
+ it '&& one wildcard left and two lowercase chars -> valid' do
454
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
455
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\!}', trace: true, reporter: reporter)
456
+ end
457
+
458
+ it '&& one wildcard left two uppercase chars -> valid' do
459
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
460
+ expect(parser.marc_spec).to parse('...$9{$a|$b}{$c}', trace: true, reporter: reporter)
461
+ end
462
+
463
+ it '&& one wildcard left with two digits -> valid' do
464
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
465
+ expect(parser.marc_spec).to parse('...$9{?$a}', trace: true, reporter: reporter)
466
+ end
467
+
468
+ it '&& two digits wildcard right -> valid' do
469
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
470
+ expect(parser.marc_spec).to parse('...$9{$a=$b}', trace: true, reporter: reporter)
471
+ end
472
+
473
+ it '&& two wildcards and one lowercase char right -> valid' do
474
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
475
+ expect(parser.marc_spec).to parse('...$9{$a~\\test\\}}', trace: true, reporter: reporter)
476
+ end
477
+
478
+ it '&& two wildcards left one uppercase char -> valid' do
479
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
480
+ expect(parser.marc_spec).to parse('...$9{/#=\\/}', trace: true, reporter: reporter)
481
+ end
482
+
483
+ it '&& two wildcards left with digit -> valid' do
484
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
485
+ expect(parser.marc_spec).to parse('...$9{$a}', trace: true, reporter: reporter)
486
+ end
487
+
488
+ it '&& wildcard between digits -> valid' do
489
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
490
+ expect(parser.marc_spec).to parse('...$9{!$a}', trace: true, reporter: reporter)
491
+ end
492
+
493
+ end
494
+
495
+ describe 'subfieldtag !' do
496
+
497
+ it '&& all digits -> valid' do
498
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
499
+ expect(parser.marc_spec).to parse('...$!{$a~\\Poe}', trace: true, reporter: reporter)
500
+ end
501
+
502
+ it '&& all lowercase chars -> valid' do
503
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
504
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\{}', trace: true, reporter: reporter)
505
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\~}', trace: true, reporter: reporter)
506
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\?}', trace: true, reporter: reporter)
507
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\|}', trace: true, reporter: reporter)
508
+ end
509
+
510
+ it '&& all uppercase chars special leader -> valid' do
511
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
512
+ expect(parser.marc_spec).to parse('...$!{$a!~\\Poe}', trace: true, reporter: reporter)
513
+ end
514
+
515
+ it '&& all wildcards -> valid' do
516
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
517
+ expect(parser.marc_spec).to parse('...$!{245$a}', trace: true, reporter: reporter)
518
+ end
519
+
520
+ it '&& mix one lowercase char and two digits -> valid' do
521
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
522
+ expect(parser.marc_spec).to parse('...$!{$a|$b|$c}', trace: true, reporter: reporter)
523
+ end
524
+
525
+ it '&& mix two lowercase chars and one digit -> valid' do
526
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
527
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\$}', trace: true, reporter: reporter)
528
+ end
529
+
530
+ it '&& one digit two wildcards right -> valid' do
531
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
532
+ expect(parser.marc_spec).to parse('...$!{$a!=$b}', trace: true, reporter: reporter)
533
+ end
534
+
535
+ it '&& one lowercase and two wildcards right -> valid' do
536
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
537
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\=}', trace: true, reporter: reporter)
538
+ end
539
+
540
+ it '&& one uppercase char two wildcards right -> valid' do
541
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
542
+ expect(parser.marc_spec).to parse('...$!{$a|$b}{$c|$d}', trace: true, reporter: reporter)
543
+ end
544
+
545
+ it '&& one wildcard between uppercase chars -> valid' do
546
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
547
+ expect(parser.marc_spec).to parse('...$!{$a}{$b|$c}', trace: true, reporter: reporter)
548
+ end
549
+
550
+ it '&& one wildcard left and two lowercase chars -> valid' do
551
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
552
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\!}', trace: true, reporter: reporter)
553
+ end
554
+
555
+ it '&& one wildcard left two uppercase chars -> valid' do
556
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
557
+ expect(parser.marc_spec).to parse('...$!{$a|$b}{$c}', trace: true, reporter: reporter)
558
+ end
559
+
560
+ it '&& one wildcard left with two digits -> valid' do
561
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
562
+ expect(parser.marc_spec).to parse('...$!{?$a}', trace: true, reporter: reporter)
563
+ end
564
+
565
+ it '&& two digits wildcard right -> valid' do
566
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
567
+ expect(parser.marc_spec).to parse('...$!{$a=$b}', trace: true, reporter: reporter)
568
+ end
569
+
570
+ it '&& two wildcards and one lowercase char right -> valid' do
571
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
572
+ expect(parser.marc_spec).to parse('...$!{$a~\\test\\}}', trace: true, reporter: reporter)
573
+ end
574
+
575
+ it '&& two wildcards left one uppercase char -> valid' do
576
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
577
+ expect(parser.marc_spec).to parse('...$!{/#=\\/}', trace: true, reporter: reporter)
578
+ end
579
+
580
+ it '&& two wildcards left with digit -> valid' do
581
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
582
+ expect(parser.marc_spec).to parse('...$!{$a}', trace: true, reporter: reporter)
583
+ end
584
+
585
+ it '&& wildcard between digits -> valid' do
586
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
587
+ expect(parser.marc_spec).to parse('...$!{!$a}', trace: true, reporter: reporter)
588
+ end
589
+
590
+ end
591
+
592
+ describe 'subfieldtag #' do
593
+
594
+ it '&& all digits -> valid' do
595
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
596
+ expect(parser.marc_spec).to parse("...$\#{$a~\\Poe}", trace: true, reporter: reporter)
597
+ end
598
+
599
+ it '&& all lowercase chars -> valid' do
600
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
601
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\{}", trace: true, reporter: reporter)
602
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\~}", trace: true, reporter: reporter)
603
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\?}", trace: true, reporter: reporter)
604
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\|}", trace: true, reporter: reporter)
605
+ end
606
+
607
+ it '&& all uppercase chars special leader -> valid' do
608
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
609
+ expect(parser.marc_spec).to parse("...$\#{$a!~\\Poe}", trace: true, reporter: reporter)
610
+ end
611
+
612
+ it '&& all wildcards -> valid' do
613
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
614
+ expect(parser.marc_spec).to parse("...$\#{245$a}", trace: true, reporter: reporter)
615
+ end
616
+
617
+ it '&& mix one lowercase char and two digits -> valid' do
618
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
619
+ expect(parser.marc_spec).to parse("...$\#{$a|$b|$c}", trace: true, reporter: reporter)
620
+ end
621
+
622
+ it '&& mix two lowercase chars and one digit -> valid' do
623
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
624
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\$}", trace: true, reporter: reporter)
625
+ end
626
+
627
+ it '&& one digit two wildcards right -> valid' do
628
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
629
+ expect(parser.marc_spec).to parse("...$\#{$a!=$b}", trace: true, reporter: reporter)
630
+ end
631
+
632
+ it '&& one lowercase and two wildcards right -> valid' do
633
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
634
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\=}", trace: true, reporter: reporter)
635
+ end
636
+
637
+ it '&& one uppercase char two wildcards right -> valid' do
638
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
639
+ expect(parser.marc_spec).to parse("...$\#{$a|$b}{$c|$d}", trace: true, reporter: reporter)
640
+ end
641
+
642
+ it '&& one wildcard between uppercase chars -> valid' do
643
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
644
+ expect(parser.marc_spec).to parse("...$\#{$a}{$b|$c}", trace: true, reporter: reporter)
645
+ end
646
+
647
+ it '&& one wildcard left and two lowercase chars -> valid' do
648
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
649
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\!}", trace: true, reporter: reporter)
650
+ end
651
+
652
+ it '&& one wildcard left two uppercase chars -> valid' do
653
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
654
+ expect(parser.marc_spec).to parse("...$\#{$a|$b}{$c}", trace: true, reporter: reporter)
655
+ end
656
+
657
+ it '&& one wildcard left with two digits -> valid' do
658
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
659
+ expect(parser.marc_spec).to parse("...$\#{?$a}", trace: true, reporter: reporter)
660
+ end
661
+
662
+ it '&& two digits wildcard right -> valid' do
663
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
664
+ expect(parser.marc_spec).to parse("...$\#{$a=$b}", trace: true, reporter: reporter)
665
+ end
666
+
667
+ it '&& two wildcards and one lowercase char right -> valid' do
668
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
669
+ expect(parser.marc_spec).to parse("...$\#{$a~\\test\\}}", trace: true, reporter: reporter)
670
+ end
671
+
672
+ it '&& two wildcards left one uppercase char -> valid' do
673
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
674
+ expect(parser.marc_spec).to parse("...$\#{/#=\\/}", trace: true, reporter: reporter)
675
+ end
676
+
677
+ it '&& two wildcards left with digit -> valid' do
678
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
679
+ expect(parser.marc_spec).to parse("...$\#{$a}", trace: true, reporter: reporter)
680
+ end
681
+
682
+ it '&& wildcard between digits -> valid' do
683
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
684
+ expect(parser.marc_spec).to parse("...$\#{!$a}", trace: true, reporter: reporter)
685
+ end
686
+
687
+ end
688
+
689
+ describe 'subfieldtag $' do
690
+
691
+ it '&& all digits -> valid' do
692
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
693
+ expect(parser.marc_spec).to parse('...$${$a~\\Poe}', trace: true, reporter: reporter)
694
+ end
695
+
696
+ it '&& all lowercase chars -> valid' do
697
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
698
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\{}', trace: true, reporter: reporter)
699
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\~}', trace: true, reporter: reporter)
700
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\?}', trace: true, reporter: reporter)
701
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\|}', trace: true, reporter: reporter)
702
+ end
703
+
704
+ it '&& all uppercase chars special leader -> valid' do
705
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
706
+ expect(parser.marc_spec).to parse('...$${$a!~\\Poe}', trace: true, reporter: reporter)
707
+ end
708
+
709
+ it '&& all wildcards -> valid' do
710
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
711
+ expect(parser.marc_spec).to parse('...$${245$a}', trace: true, reporter: reporter)
712
+ end
713
+
714
+ it '&& mix one lowercase char and two digits -> valid' do
715
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
716
+ expect(parser.marc_spec).to parse('...$${$a|$b|$c}', trace: true, reporter: reporter)
717
+ end
718
+
719
+ it '&& mix two lowercase chars and one digit -> valid' do
720
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
721
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\$}', trace: true, reporter: reporter)
722
+ end
723
+
724
+ it '&& one digit two wildcards right -> valid' do
725
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
726
+ expect(parser.marc_spec).to parse('...$${$a!=$b}', trace: true, reporter: reporter)
727
+ end
728
+
729
+ it '&& one lowercase and two wildcards right -> valid' do
730
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
731
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\=}', trace: true, reporter: reporter)
732
+ end
733
+
734
+ it '&& one uppercase char two wildcards right -> valid' do
735
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
736
+ expect(parser.marc_spec).to parse('...$${$a|$b}{$c|$d}', trace: true, reporter: reporter)
737
+ end
738
+
739
+ it '&& one wildcard between uppercase chars -> valid' do
740
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
741
+ expect(parser.marc_spec).to parse('...$${$a}{$b|$c}', trace: true, reporter: reporter)
742
+ end
743
+
744
+ it '&& one wildcard left and two lowercase chars -> valid' do
745
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
746
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\!}', trace: true, reporter: reporter)
747
+ end
748
+
749
+ it '&& one wildcard left two uppercase chars -> valid' do
750
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
751
+ expect(parser.marc_spec).to parse('...$${$a|$b}{$c}', trace: true, reporter: reporter)
752
+ end
753
+
754
+ it '&& one wildcard left with two digits -> valid' do
755
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
756
+ expect(parser.marc_spec).to parse('...$${?$a}', trace: true, reporter: reporter)
757
+ end
758
+
759
+ it '&& two digits wildcard right -> valid' do
760
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
761
+ expect(parser.marc_spec).to parse('...$${$a=$b}', trace: true, reporter: reporter)
762
+ end
763
+
764
+ it '&& two wildcards and one lowercase char right -> valid' do
765
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
766
+ expect(parser.marc_spec).to parse('...$${$a~\\test\\}}', trace: true, reporter: reporter)
767
+ end
768
+
769
+ it '&& two wildcards left one uppercase char -> valid' do
770
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
771
+ expect(parser.marc_spec).to parse('...$${/#=\\/}', trace: true, reporter: reporter)
772
+ end
773
+
774
+ it '&& two wildcards left with digit -> valid' do
775
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
776
+ expect(parser.marc_spec).to parse('...$${$a}', trace: true, reporter: reporter)
777
+ end
778
+
779
+ it '&& wildcard between digits -> valid' do
780
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
781
+ expect(parser.marc_spec).to parse('...$${!$a}', trace: true, reporter: reporter)
782
+ end
783
+
784
+ end
785
+
786
+ describe 'subfieldtag %' do
787
+
788
+ it '&& all digits -> valid' do
789
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
790
+ expect(parser.marc_spec).to parse('...$%{$a~\\Poe}', trace: true, reporter: reporter)
791
+ end
792
+
793
+ it '&& all lowercase chars -> valid' do
794
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
795
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\{}', trace: true, reporter: reporter)
796
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\~}', trace: true, reporter: reporter)
797
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\?}', trace: true, reporter: reporter)
798
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\|}', trace: true, reporter: reporter)
799
+ end
800
+
801
+ it '&& all uppercase chars special leader -> valid' do
802
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
803
+ expect(parser.marc_spec).to parse('...$%{$a!~\\Poe}', trace: true, reporter: reporter)
804
+ end
805
+
806
+ it '&& all wildcards -> valid' do
807
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
808
+ expect(parser.marc_spec).to parse('...$%{245$a}', trace: true, reporter: reporter)
809
+ end
810
+
811
+ it '&& mix one lowercase char and two digits -> valid' do
812
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
813
+ expect(parser.marc_spec).to parse('...$%{$a|$b|$c}', trace: true, reporter: reporter)
814
+ end
815
+
816
+ it '&& mix two lowercase chars and one digit -> valid' do
817
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
818
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\$}', trace: true, reporter: reporter)
819
+ end
820
+
821
+ it '&& one digit two wildcards right -> valid' do
822
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
823
+ expect(parser.marc_spec).to parse('...$%{$a!=$b}', trace: true, reporter: reporter)
824
+ end
825
+
826
+ it '&& one lowercase and two wildcards right -> valid' do
827
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
828
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\=}', trace: true, reporter: reporter)
829
+ end
830
+
831
+ it '&& one uppercase char two wildcards right -> valid' do
832
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
833
+ expect(parser.marc_spec).to parse('...$%{$a|$b}{$c|$d}', trace: true, reporter: reporter)
834
+ end
835
+
836
+ it '&& one wildcard between uppercase chars -> valid' do
837
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
838
+ expect(parser.marc_spec).to parse('...$%{$a}{$b|$c}', trace: true, reporter: reporter)
839
+ end
840
+
841
+ it '&& one wildcard left and two lowercase chars -> valid' do
842
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
843
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\!}', trace: true, reporter: reporter)
844
+ end
845
+
846
+ it '&& one wildcard left two uppercase chars -> valid' do
847
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
848
+ expect(parser.marc_spec).to parse('...$%{$a|$b}{$c}', trace: true, reporter: reporter)
849
+ end
850
+
851
+ it '&& one wildcard left with two digits -> valid' do
852
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
853
+ expect(parser.marc_spec).to parse('...$%{?$a}', trace: true, reporter: reporter)
854
+ end
855
+
856
+ it '&& two digits wildcard right -> valid' do
857
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
858
+ expect(parser.marc_spec).to parse('...$%{$a=$b}', trace: true, reporter: reporter)
859
+ end
860
+
861
+ it '&& two wildcards and one lowercase char right -> valid' do
862
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
863
+ expect(parser.marc_spec).to parse('...$%{$a~\\test\\}}', trace: true, reporter: reporter)
864
+ end
865
+
866
+ it '&& two wildcards left one uppercase char -> valid' do
867
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
868
+ expect(parser.marc_spec).to parse('...$%{/#=\\/}', trace: true, reporter: reporter)
869
+ end
870
+
871
+ it '&& two wildcards left with digit -> valid' do
872
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
873
+ expect(parser.marc_spec).to parse('...$%{$a}', trace: true, reporter: reporter)
874
+ end
875
+
876
+ it '&& wildcard between digits -> valid' do
877
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
878
+ expect(parser.marc_spec).to parse('...$%{!$a}', trace: true, reporter: reporter)
879
+ end
880
+
881
+ end
882
+
883
+ describe "subfieldtag '" do
884
+
885
+ it '&& all digits -> valid' do
886
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
887
+ expect(parser.marc_spec).to parse("...$'{$a~\\Poe}", trace: true, reporter: reporter)
888
+ end
889
+
890
+ it '&& all lowercase chars -> valid' do
891
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
892
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\{}", trace: true, reporter: reporter)
893
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\~}", trace: true, reporter: reporter)
894
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\?}", trace: true, reporter: reporter)
895
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\|}", trace: true, reporter: reporter)
896
+ end
897
+
898
+ it '&& all uppercase chars special leader -> valid' do
899
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
900
+ expect(parser.marc_spec).to parse("...$'{$a!~\\Poe}", trace: true, reporter: reporter)
901
+ end
902
+
903
+ it '&& all wildcards -> valid' do
904
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
905
+ expect(parser.marc_spec).to parse("...$'{245$a}", trace: true, reporter: reporter)
906
+ end
907
+
908
+ it '&& mix one lowercase char and two digits -> valid' do
909
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
910
+ expect(parser.marc_spec).to parse("...$'{$a|$b|$c}", trace: true, reporter: reporter)
911
+ end
912
+
913
+ it '&& mix two lowercase chars and one digit -> valid' do
914
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
915
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\$}", trace: true, reporter: reporter)
916
+ end
917
+
918
+ it '&& one digit two wildcards right -> valid' do
919
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
920
+ expect(parser.marc_spec).to parse("...$'{$a!=$b}", trace: true, reporter: reporter)
921
+ end
922
+
923
+ it '&& one lowercase and two wildcards right -> valid' do
924
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
925
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\=}", trace: true, reporter: reporter)
926
+ end
927
+
928
+ it '&& one uppercase char two wildcards right -> valid' do
929
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
930
+ expect(parser.marc_spec).to parse("...$'{$a|$b}{$c|$d}", trace: true, reporter: reporter)
931
+ end
932
+
933
+ it '&& one wildcard between uppercase chars -> valid' do
934
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
935
+ expect(parser.marc_spec).to parse("...$'{$a}{$b|$c}", trace: true, reporter: reporter)
936
+ end
937
+
938
+ it '&& one wildcard left and two lowercase chars -> valid' do
939
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
940
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\!}", trace: true, reporter: reporter)
941
+ end
942
+
943
+ it '&& one wildcard left two uppercase chars -> valid' do
944
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
945
+ expect(parser.marc_spec).to parse("...$'{$a|$b}{$c}", trace: true, reporter: reporter)
946
+ end
947
+
948
+ it '&& one wildcard left with two digits -> valid' do
949
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
950
+ expect(parser.marc_spec).to parse("...$'{?$a}", trace: true, reporter: reporter)
951
+ end
952
+
953
+ it '&& two digits wildcard right -> valid' do
954
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
955
+ expect(parser.marc_spec).to parse("...$'{$a=$b}", trace: true, reporter: reporter)
956
+ end
957
+
958
+ it '&& two wildcards and one lowercase char right -> valid' do
959
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
960
+ expect(parser.marc_spec).to parse("...$'{$a~\\test\\}}", trace: true, reporter: reporter)
961
+ end
962
+
963
+ it '&& two wildcards left one uppercase char -> valid' do
964
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
965
+ expect(parser.marc_spec).to parse("...$'{/#=\\/}", trace: true, reporter: reporter)
966
+ end
967
+
968
+ it '&& two wildcards left with digit -> valid' do
969
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
970
+ expect(parser.marc_spec).to parse("...$'{$a}", trace: true, reporter: reporter)
971
+ end
972
+
973
+ it '&& wildcard between digits -> valid' do
974
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
975
+ expect(parser.marc_spec).to parse("...$'{!$a}", trace: true, reporter: reporter)
976
+ end
977
+
978
+ end
979
+
980
+ describe 'subfieldtag (' do
981
+
982
+ it '&& all digits -> valid' do
983
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
984
+ expect(parser.marc_spec).to parse('...$({$a~\\Poe}', trace: true, reporter: reporter)
985
+ end
986
+
987
+ it '&& all lowercase chars -> valid' do
988
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
989
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\{}', trace: true, reporter: reporter)
990
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\~}', trace: true, reporter: reporter)
991
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\?}', trace: true, reporter: reporter)
992
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\|}', trace: true, reporter: reporter)
993
+ end
994
+
995
+ it '&& all uppercase chars special leader -> valid' do
996
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
997
+ expect(parser.marc_spec).to parse('...$({$a!~\\Poe}', trace: true, reporter: reporter)
998
+ end
999
+
1000
+ it '&& all wildcards -> valid' do
1001
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1002
+ expect(parser.marc_spec).to parse('...$({245$a}', trace: true, reporter: reporter)
1003
+ end
1004
+
1005
+ it '&& mix one lowercase char and two digits -> valid' do
1006
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1007
+ expect(parser.marc_spec).to parse('...$({$a|$b|$c}', trace: true, reporter: reporter)
1008
+ end
1009
+
1010
+ it '&& mix two lowercase chars and one digit -> valid' do
1011
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1012
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\$}', trace: true, reporter: reporter)
1013
+ end
1014
+
1015
+ it '&& one digit two wildcards right -> valid' do
1016
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1017
+ expect(parser.marc_spec).to parse('...$({$a!=$b}', trace: true, reporter: reporter)
1018
+ end
1019
+
1020
+ it '&& one lowercase and two wildcards right -> valid' do
1021
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1022
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\=}', trace: true, reporter: reporter)
1023
+ end
1024
+
1025
+ it '&& one uppercase char two wildcards right -> valid' do
1026
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1027
+ expect(parser.marc_spec).to parse('...$({$a|$b}{$c|$d}', trace: true, reporter: reporter)
1028
+ end
1029
+
1030
+ it '&& one wildcard between uppercase chars -> valid' do
1031
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1032
+ expect(parser.marc_spec).to parse('...$({$a}{$b|$c}', trace: true, reporter: reporter)
1033
+ end
1034
+
1035
+ it '&& one wildcard left and two lowercase chars -> valid' do
1036
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1037
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\!}', trace: true, reporter: reporter)
1038
+ end
1039
+
1040
+ it '&& one wildcard left two uppercase chars -> valid' do
1041
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1042
+ expect(parser.marc_spec).to parse('...$({$a|$b}{$c}', trace: true, reporter: reporter)
1043
+ end
1044
+
1045
+ it '&& one wildcard left with two digits -> valid' do
1046
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1047
+ expect(parser.marc_spec).to parse('...$({?$a}', trace: true, reporter: reporter)
1048
+ end
1049
+
1050
+ it '&& two digits wildcard right -> valid' do
1051
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1052
+ expect(parser.marc_spec).to parse('...$({$a=$b}', trace: true, reporter: reporter)
1053
+ end
1054
+
1055
+ it '&& two wildcards and one lowercase char right -> valid' do
1056
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1057
+ expect(parser.marc_spec).to parse('...$({$a~\\test\\}}', trace: true, reporter: reporter)
1058
+ end
1059
+
1060
+ it '&& two wildcards left one uppercase char -> valid' do
1061
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1062
+ expect(parser.marc_spec).to parse('...$({/#=\\/}', trace: true, reporter: reporter)
1063
+ end
1064
+
1065
+ it '&& two wildcards left with digit -> valid' do
1066
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1067
+ expect(parser.marc_spec).to parse('...$({$a}', trace: true, reporter: reporter)
1068
+ end
1069
+
1070
+ it '&& wildcard between digits -> valid' do
1071
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1072
+ expect(parser.marc_spec).to parse('...$({!$a}', trace: true, reporter: reporter)
1073
+ end
1074
+
1075
+ end
1076
+
1077
+ describe 'subfieldtag )' do
1078
+
1079
+ it '&& all digits -> valid' do
1080
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1081
+ expect(parser.marc_spec).to parse('...$){$a~\\Poe}', trace: true, reporter: reporter)
1082
+ end
1083
+
1084
+ it '&& all lowercase chars -> valid' do
1085
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1086
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\{}', trace: true, reporter: reporter)
1087
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\~}', trace: true, reporter: reporter)
1088
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\?}', trace: true, reporter: reporter)
1089
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\|}', trace: true, reporter: reporter)
1090
+ end
1091
+
1092
+ it '&& all uppercase chars special leader -> valid' do
1093
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1094
+ expect(parser.marc_spec).to parse('...$){$a!~\\Poe}', trace: true, reporter: reporter)
1095
+ end
1096
+
1097
+ it '&& all wildcards -> valid' do
1098
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1099
+ expect(parser.marc_spec).to parse('...$){245$a}', trace: true, reporter: reporter)
1100
+ end
1101
+
1102
+ it '&& mix one lowercase char and two digits -> valid' do
1103
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1104
+ expect(parser.marc_spec).to parse('...$){$a|$b|$c}', trace: true, reporter: reporter)
1105
+ end
1106
+
1107
+ it '&& mix two lowercase chars and one digit -> valid' do
1108
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1109
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\$}', trace: true, reporter: reporter)
1110
+ end
1111
+
1112
+ it '&& one digit two wildcards right -> valid' do
1113
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1114
+ expect(parser.marc_spec).to parse('...$){$a!=$b}', trace: true, reporter: reporter)
1115
+ end
1116
+
1117
+ it '&& one lowercase and two wildcards right -> valid' do
1118
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1119
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\=}', trace: true, reporter: reporter)
1120
+ end
1121
+
1122
+ it '&& one uppercase char two wildcards right -> valid' do
1123
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1124
+ expect(parser.marc_spec).to parse('...$){$a|$b}{$c|$d}', trace: true, reporter: reporter)
1125
+ end
1126
+
1127
+ it '&& one wildcard between uppercase chars -> valid' do
1128
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1129
+ expect(parser.marc_spec).to parse('...$){$a}{$b|$c}', trace: true, reporter: reporter)
1130
+ end
1131
+
1132
+ it '&& one wildcard left and two lowercase chars -> valid' do
1133
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1134
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\!}', trace: true, reporter: reporter)
1135
+ end
1136
+
1137
+ it '&& one wildcard left two uppercase chars -> valid' do
1138
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1139
+ expect(parser.marc_spec).to parse('...$){$a|$b}{$c}', trace: true, reporter: reporter)
1140
+ end
1141
+
1142
+ it '&& one wildcard left with two digits -> valid' do
1143
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1144
+ expect(parser.marc_spec).to parse('...$){?$a}', trace: true, reporter: reporter)
1145
+ end
1146
+
1147
+ it '&& two digits wildcard right -> valid' do
1148
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1149
+ expect(parser.marc_spec).to parse('...$){$a=$b}', trace: true, reporter: reporter)
1150
+ end
1151
+
1152
+ it '&& two wildcards and one lowercase char right -> valid' do
1153
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1154
+ expect(parser.marc_spec).to parse('...$){$a~\\test\\}}', trace: true, reporter: reporter)
1155
+ end
1156
+
1157
+ it '&& two wildcards left one uppercase char -> valid' do
1158
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1159
+ expect(parser.marc_spec).to parse('...$){/#=\\/}', trace: true, reporter: reporter)
1160
+ end
1161
+
1162
+ it '&& two wildcards left with digit -> valid' do
1163
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1164
+ expect(parser.marc_spec).to parse('...$){$a}', trace: true, reporter: reporter)
1165
+ end
1166
+
1167
+ it '&& wildcard between digits -> valid' do
1168
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1169
+ expect(parser.marc_spec).to parse('...$){!$a}', trace: true, reporter: reporter)
1170
+ end
1171
+
1172
+ end
1173
+
1174
+ describe 'subfieldtag *' do
1175
+
1176
+ it '&& all digits -> valid' do
1177
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1178
+ expect(parser.marc_spec).to parse('...$*{$a~\\Poe}', trace: true, reporter: reporter)
1179
+ end
1180
+
1181
+ it '&& all lowercase chars -> valid' do
1182
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1183
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\{}', trace: true, reporter: reporter)
1184
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\~}', trace: true, reporter: reporter)
1185
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\?}', trace: true, reporter: reporter)
1186
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\|}', trace: true, reporter: reporter)
1187
+ end
1188
+
1189
+ it '&& all uppercase chars special leader -> valid' do
1190
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1191
+ expect(parser.marc_spec).to parse('...$*{$a!~\\Poe}', trace: true, reporter: reporter)
1192
+ end
1193
+
1194
+ it '&& all wildcards -> valid' do
1195
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1196
+ expect(parser.marc_spec).to parse('...$*{245$a}', trace: true, reporter: reporter)
1197
+ end
1198
+
1199
+ it '&& mix one lowercase char and two digits -> valid' do
1200
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1201
+ expect(parser.marc_spec).to parse('...$*{$a|$b|$c}', trace: true, reporter: reporter)
1202
+ end
1203
+
1204
+ it '&& mix two lowercase chars and one digit -> valid' do
1205
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1206
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\$}', trace: true, reporter: reporter)
1207
+ end
1208
+
1209
+ it '&& one digit two wildcards right -> valid' do
1210
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1211
+ expect(parser.marc_spec).to parse('...$*{$a!=$b}', trace: true, reporter: reporter)
1212
+ end
1213
+
1214
+ it '&& one lowercase and two wildcards right -> valid' do
1215
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1216
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\=}', trace: true, reporter: reporter)
1217
+ end
1218
+
1219
+ it '&& one uppercase char two wildcards right -> valid' do
1220
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1221
+ expect(parser.marc_spec).to parse('...$*{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1222
+ end
1223
+
1224
+ it '&& one wildcard between uppercase chars -> valid' do
1225
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1226
+ expect(parser.marc_spec).to parse('...$*{$a}{$b|$c}', trace: true, reporter: reporter)
1227
+ end
1228
+
1229
+ it '&& one wildcard left and two lowercase chars -> valid' do
1230
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1231
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\!}', trace: true, reporter: reporter)
1232
+ end
1233
+
1234
+ it '&& one wildcard left two uppercase chars -> valid' do
1235
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1236
+ expect(parser.marc_spec).to parse('...$*{$a|$b}{$c}', trace: true, reporter: reporter)
1237
+ end
1238
+
1239
+ it '&& one wildcard left with two digits -> valid' do
1240
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1241
+ expect(parser.marc_spec).to parse('...$*{?$a}', trace: true, reporter: reporter)
1242
+ end
1243
+
1244
+ it '&& two digits wildcard right -> valid' do
1245
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1246
+ expect(parser.marc_spec).to parse('...$*{$a=$b}', trace: true, reporter: reporter)
1247
+ end
1248
+
1249
+ it '&& two wildcards and one lowercase char right -> valid' do
1250
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1251
+ expect(parser.marc_spec).to parse('...$*{$a~\\test\\}}', trace: true, reporter: reporter)
1252
+ end
1253
+
1254
+ it '&& two wildcards left one uppercase char -> valid' do
1255
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1256
+ expect(parser.marc_spec).to parse('...$*{/#=\\/}', trace: true, reporter: reporter)
1257
+ end
1258
+
1259
+ it '&& two wildcards left with digit -> valid' do
1260
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1261
+ expect(parser.marc_spec).to parse('...$*{$a}', trace: true, reporter: reporter)
1262
+ end
1263
+
1264
+ it '&& wildcard between digits -> valid' do
1265
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1266
+ expect(parser.marc_spec).to parse('...$*{!$a}', trace: true, reporter: reporter)
1267
+ end
1268
+
1269
+ end
1270
+
1271
+ describe 'subfieldtag +' do
1272
+
1273
+ it '&& all digits -> valid' do
1274
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1275
+ expect(parser.marc_spec).to parse('...$+{$a~\\Poe}', trace: true, reporter: reporter)
1276
+ end
1277
+
1278
+ it '&& all lowercase chars -> valid' do
1279
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1280
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\{}', trace: true, reporter: reporter)
1281
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\~}', trace: true, reporter: reporter)
1282
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\?}', trace: true, reporter: reporter)
1283
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\|}', trace: true, reporter: reporter)
1284
+ end
1285
+
1286
+ it '&& all uppercase chars special leader -> valid' do
1287
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1288
+ expect(parser.marc_spec).to parse('...$+{$a!~\\Poe}', trace: true, reporter: reporter)
1289
+ end
1290
+
1291
+ it '&& all wildcards -> valid' do
1292
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1293
+ expect(parser.marc_spec).to parse('...$+{245$a}', trace: true, reporter: reporter)
1294
+ end
1295
+
1296
+ it '&& mix one lowercase char and two digits -> valid' do
1297
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1298
+ expect(parser.marc_spec).to parse('...$+{$a|$b|$c}', trace: true, reporter: reporter)
1299
+ end
1300
+
1301
+ it '&& mix two lowercase chars and one digit -> valid' do
1302
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1303
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\$}', trace: true, reporter: reporter)
1304
+ end
1305
+
1306
+ it '&& one digit two wildcards right -> valid' do
1307
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1308
+ expect(parser.marc_spec).to parse('...$+{$a!=$b}', trace: true, reporter: reporter)
1309
+ end
1310
+
1311
+ it '&& one lowercase and two wildcards right -> valid' do
1312
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1313
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\=}', trace: true, reporter: reporter)
1314
+ end
1315
+
1316
+ it '&& one uppercase char two wildcards right -> valid' do
1317
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1318
+ expect(parser.marc_spec).to parse('...$+{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1319
+ end
1320
+
1321
+ it '&& one wildcard between uppercase chars -> valid' do
1322
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1323
+ expect(parser.marc_spec).to parse('...$+{$a}{$b|$c}', trace: true, reporter: reporter)
1324
+ end
1325
+
1326
+ it '&& one wildcard left and two lowercase chars -> valid' do
1327
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1328
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\!}', trace: true, reporter: reporter)
1329
+ end
1330
+
1331
+ it '&& one wildcard left two uppercase chars -> valid' do
1332
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1333
+ expect(parser.marc_spec).to parse('...$+{$a|$b}{$c}', trace: true, reporter: reporter)
1334
+ end
1335
+
1336
+ it '&& one wildcard left with two digits -> valid' do
1337
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1338
+ expect(parser.marc_spec).to parse('...$+{?$a}', trace: true, reporter: reporter)
1339
+ end
1340
+
1341
+ it '&& two digits wildcard right -> valid' do
1342
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1343
+ expect(parser.marc_spec).to parse('...$+{$a=$b}', trace: true, reporter: reporter)
1344
+ end
1345
+
1346
+ it '&& two wildcards and one lowercase char right -> valid' do
1347
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1348
+ expect(parser.marc_spec).to parse('...$+{$a~\\test\\}}', trace: true, reporter: reporter)
1349
+ end
1350
+
1351
+ it '&& two wildcards left one uppercase char -> valid' do
1352
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1353
+ expect(parser.marc_spec).to parse('...$+{/#=\\/}', trace: true, reporter: reporter)
1354
+ end
1355
+
1356
+ it '&& two wildcards left with digit -> valid' do
1357
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1358
+ expect(parser.marc_spec).to parse('...$+{$a}', trace: true, reporter: reporter)
1359
+ end
1360
+
1361
+ it '&& wildcard between digits -> valid' do
1362
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1363
+ expect(parser.marc_spec).to parse('...$+{!$a}', trace: true, reporter: reporter)
1364
+ end
1365
+
1366
+ end
1367
+
1368
+ describe 'subfieldtag ,' do
1369
+
1370
+ it '&& all digits -> valid' do
1371
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1372
+ expect(parser.marc_spec).to parse('...$,{$a~\\Poe}', trace: true, reporter: reporter)
1373
+ end
1374
+
1375
+ it '&& all lowercase chars -> valid' do
1376
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1377
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\{}', trace: true, reporter: reporter)
1378
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\~}', trace: true, reporter: reporter)
1379
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\?}', trace: true, reporter: reporter)
1380
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\|}', trace: true, reporter: reporter)
1381
+ end
1382
+
1383
+ it '&& all uppercase chars special leader -> valid' do
1384
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1385
+ expect(parser.marc_spec).to parse('...$,{$a!~\\Poe}', trace: true, reporter: reporter)
1386
+ end
1387
+
1388
+ it '&& all wildcards -> valid' do
1389
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1390
+ expect(parser.marc_spec).to parse('...$,{245$a}', trace: true, reporter: reporter)
1391
+ end
1392
+
1393
+ it '&& mix one lowercase char and two digits -> valid' do
1394
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1395
+ expect(parser.marc_spec).to parse('...$,{$a|$b|$c}', trace: true, reporter: reporter)
1396
+ end
1397
+
1398
+ it '&& mix two lowercase chars and one digit -> valid' do
1399
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1400
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\$}', trace: true, reporter: reporter)
1401
+ end
1402
+
1403
+ it '&& one digit two wildcards right -> valid' do
1404
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1405
+ expect(parser.marc_spec).to parse('...$,{$a!=$b}', trace: true, reporter: reporter)
1406
+ end
1407
+
1408
+ it '&& one lowercase and two wildcards right -> valid' do
1409
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1410
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\=}', trace: true, reporter: reporter)
1411
+ end
1412
+
1413
+ it '&& one uppercase char two wildcards right -> valid' do
1414
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1415
+ expect(parser.marc_spec).to parse('...$,{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1416
+ end
1417
+
1418
+ it '&& one wildcard between uppercase chars -> valid' do
1419
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1420
+ expect(parser.marc_spec).to parse('...$,{$a}{$b|$c}', trace: true, reporter: reporter)
1421
+ end
1422
+
1423
+ it '&& one wildcard left and two lowercase chars -> valid' do
1424
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1425
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\!}', trace: true, reporter: reporter)
1426
+ end
1427
+
1428
+ it '&& one wildcard left two uppercase chars -> valid' do
1429
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1430
+ expect(parser.marc_spec).to parse('...$,{$a|$b}{$c}', trace: true, reporter: reporter)
1431
+ end
1432
+
1433
+ it '&& one wildcard left with two digits -> valid' do
1434
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1435
+ expect(parser.marc_spec).to parse('...$,{?$a}', trace: true, reporter: reporter)
1436
+ end
1437
+
1438
+ it '&& two digits wildcard right -> valid' do
1439
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1440
+ expect(parser.marc_spec).to parse('...$,{$a=$b}', trace: true, reporter: reporter)
1441
+ end
1442
+
1443
+ it '&& two wildcards and one lowercase char right -> valid' do
1444
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1445
+ expect(parser.marc_spec).to parse('...$,{$a~\\test\\}}', trace: true, reporter: reporter)
1446
+ end
1447
+
1448
+ it '&& two wildcards left one uppercase char -> valid' do
1449
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1450
+ expect(parser.marc_spec).to parse('...$,{/#=\\/}', trace: true, reporter: reporter)
1451
+ end
1452
+
1453
+ it '&& two wildcards left with digit -> valid' do
1454
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1455
+ expect(parser.marc_spec).to parse('...$,{$a}', trace: true, reporter: reporter)
1456
+ end
1457
+
1458
+ it '&& wildcard between digits -> valid' do
1459
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1460
+ expect(parser.marc_spec).to parse('...$,{!$a}', trace: true, reporter: reporter)
1461
+ end
1462
+
1463
+ end
1464
+
1465
+ describe 'subfieldtag -' do
1466
+
1467
+ it '&& all digits -> valid' do
1468
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1469
+ expect(parser.marc_spec).to parse('...$-{$a~\\Poe}', trace: true, reporter: reporter)
1470
+ end
1471
+
1472
+ it '&& all lowercase chars -> valid' do
1473
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1474
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\{}', trace: true, reporter: reporter)
1475
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\~}', trace: true, reporter: reporter)
1476
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\?}', trace: true, reporter: reporter)
1477
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\|}', trace: true, reporter: reporter)
1478
+ end
1479
+
1480
+ it '&& all uppercase chars special leader -> valid' do
1481
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1482
+ expect(parser.marc_spec).to parse('...$-{$a!~\\Poe}', trace: true, reporter: reporter)
1483
+ end
1484
+
1485
+ it '&& all wildcards -> valid' do
1486
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1487
+ expect(parser.marc_spec).to parse('...$-{245$a}', trace: true, reporter: reporter)
1488
+ end
1489
+
1490
+ it '&& mix one lowercase char and two digits -> valid' do
1491
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1492
+ expect(parser.marc_spec).to parse('...$-{$a|$b|$c}', trace: true, reporter: reporter)
1493
+ end
1494
+
1495
+ it '&& mix two lowercase chars and one digit -> valid' do
1496
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1497
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\$}', trace: true, reporter: reporter)
1498
+ end
1499
+
1500
+ it '&& one digit two wildcards right -> valid' do
1501
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1502
+ expect(parser.marc_spec).to parse('...$-{$a!=$b}', trace: true, reporter: reporter)
1503
+ end
1504
+
1505
+ it '&& one lowercase and two wildcards right -> valid' do
1506
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1507
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\=}', trace: true, reporter: reporter)
1508
+ end
1509
+
1510
+ it '&& one uppercase char two wildcards right -> valid' do
1511
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1512
+ expect(parser.marc_spec).to parse('...$-{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1513
+ end
1514
+
1515
+ it '&& one wildcard between uppercase chars -> valid' do
1516
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1517
+ expect(parser.marc_spec).to parse('...$-{$a}{$b|$c}', trace: true, reporter: reporter)
1518
+ end
1519
+
1520
+ it '&& one wildcard left and two lowercase chars -> valid' do
1521
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1522
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\!}', trace: true, reporter: reporter)
1523
+ end
1524
+
1525
+ it '&& one wildcard left two uppercase chars -> valid' do
1526
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1527
+ expect(parser.marc_spec).to parse('...$-{$a|$b}{$c}', trace: true, reporter: reporter)
1528
+ end
1529
+
1530
+ it '&& one wildcard left with two digits -> valid' do
1531
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1532
+ expect(parser.marc_spec).to parse('...$-{?$a}', trace: true, reporter: reporter)
1533
+ end
1534
+
1535
+ it '&& two digits wildcard right -> valid' do
1536
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1537
+ expect(parser.marc_spec).to parse('...$-{$a=$b}', trace: true, reporter: reporter)
1538
+ end
1539
+
1540
+ it '&& two wildcards and one lowercase char right -> valid' do
1541
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1542
+ expect(parser.marc_spec).to parse('...$-{$a~\\test\\}}', trace: true, reporter: reporter)
1543
+ end
1544
+
1545
+ it '&& two wildcards left one uppercase char -> valid' do
1546
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1547
+ expect(parser.marc_spec).to parse('...$-{/#=\\/}', trace: true, reporter: reporter)
1548
+ end
1549
+
1550
+ it '&& two wildcards left with digit -> valid' do
1551
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1552
+ expect(parser.marc_spec).to parse('...$-{$a}', trace: true, reporter: reporter)
1553
+ end
1554
+
1555
+ it '&& wildcard between digits -> valid' do
1556
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1557
+ expect(parser.marc_spec).to parse('...$-{!$a}', trace: true, reporter: reporter)
1558
+ end
1559
+
1560
+ end
1561
+
1562
+ describe 'subfieldtag .' do
1563
+
1564
+ it '&& all digits -> valid' do
1565
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1566
+ expect(parser.marc_spec).to parse('...$.{$a~\\Poe}', trace: true, reporter: reporter)
1567
+ end
1568
+
1569
+ it '&& all lowercase chars -> valid' do
1570
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1571
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\{}', trace: true, reporter: reporter)
1572
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\~}', trace: true, reporter: reporter)
1573
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\?}', trace: true, reporter: reporter)
1574
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\|}', trace: true, reporter: reporter)
1575
+ end
1576
+
1577
+ it '&& all uppercase chars special leader -> valid' do
1578
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1579
+ expect(parser.marc_spec).to parse('...$.{$a!~\\Poe}', trace: true, reporter: reporter)
1580
+ end
1581
+
1582
+ it '&& all wildcards -> valid' do
1583
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1584
+ expect(parser.marc_spec).to parse('...$.{245$a}', trace: true, reporter: reporter)
1585
+ end
1586
+
1587
+ it '&& mix one lowercase char and two digits -> valid' do
1588
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1589
+ expect(parser.marc_spec).to parse('...$.{$a|$b|$c}', trace: true, reporter: reporter)
1590
+ end
1591
+
1592
+ it '&& mix two lowercase chars and one digit -> valid' do
1593
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1594
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\$}', trace: true, reporter: reporter)
1595
+ end
1596
+
1597
+ it '&& one digit two wildcards right -> valid' do
1598
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1599
+ expect(parser.marc_spec).to parse('...$.{$a!=$b}', trace: true, reporter: reporter)
1600
+ end
1601
+
1602
+ it '&& one lowercase and two wildcards right -> valid' do
1603
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1604
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\=}', trace: true, reporter: reporter)
1605
+ end
1606
+
1607
+ it '&& one uppercase char two wildcards right -> valid' do
1608
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1609
+ expect(parser.marc_spec).to parse('...$.{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1610
+ end
1611
+
1612
+ it '&& one wildcard between uppercase chars -> valid' do
1613
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1614
+ expect(parser.marc_spec).to parse('...$.{$a}{$b|$c}', trace: true, reporter: reporter)
1615
+ end
1616
+
1617
+ it '&& one wildcard left and two lowercase chars -> valid' do
1618
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1619
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\!}', trace: true, reporter: reporter)
1620
+ end
1621
+
1622
+ it '&& one wildcard left two uppercase chars -> valid' do
1623
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1624
+ expect(parser.marc_spec).to parse('...$.{$a|$b}{$c}', trace: true, reporter: reporter)
1625
+ end
1626
+
1627
+ it '&& one wildcard left with two digits -> valid' do
1628
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1629
+ expect(parser.marc_spec).to parse('...$.{?$a}', trace: true, reporter: reporter)
1630
+ end
1631
+
1632
+ it '&& two digits wildcard right -> valid' do
1633
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1634
+ expect(parser.marc_spec).to parse('...$.{$a=$b}', trace: true, reporter: reporter)
1635
+ end
1636
+
1637
+ it '&& two wildcards and one lowercase char right -> valid' do
1638
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1639
+ expect(parser.marc_spec).to parse('...$.{$a~\\test\\}}', trace: true, reporter: reporter)
1640
+ end
1641
+
1642
+ it '&& two wildcards left one uppercase char -> valid' do
1643
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1644
+ expect(parser.marc_spec).to parse('...$.{/#=\\/}', trace: true, reporter: reporter)
1645
+ end
1646
+
1647
+ it '&& two wildcards left with digit -> valid' do
1648
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1649
+ expect(parser.marc_spec).to parse('...$.{$a}', trace: true, reporter: reporter)
1650
+ end
1651
+
1652
+ it '&& wildcard between digits -> valid' do
1653
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1654
+ expect(parser.marc_spec).to parse('...$.{!$a}', trace: true, reporter: reporter)
1655
+ end
1656
+
1657
+ end
1658
+
1659
+ describe 'subfieldtag /' do
1660
+
1661
+ it '&& all digits -> valid' do
1662
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1663
+ expect(parser.marc_spec).to parse('...$/{$a~\\Poe}', trace: true, reporter: reporter)
1664
+ end
1665
+
1666
+ it '&& all lowercase chars -> valid' do
1667
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1668
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\{}', trace: true, reporter: reporter)
1669
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\~}', trace: true, reporter: reporter)
1670
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\?}', trace: true, reporter: reporter)
1671
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\|}', trace: true, reporter: reporter)
1672
+ end
1673
+
1674
+ it '&& all uppercase chars special leader -> valid' do
1675
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1676
+ expect(parser.marc_spec).to parse('...$/{$a!~\\Poe}', trace: true, reporter: reporter)
1677
+ end
1678
+
1679
+ it '&& all wildcards -> valid' do
1680
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1681
+ expect(parser.marc_spec).to parse('...$/{245$a}', trace: true, reporter: reporter)
1682
+ end
1683
+
1684
+ it '&& mix one lowercase char and two digits -> valid' do
1685
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1686
+ expect(parser.marc_spec).to parse('...$/{$a|$b|$c}', trace: true, reporter: reporter)
1687
+ end
1688
+
1689
+ it '&& mix two lowercase chars and one digit -> valid' do
1690
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1691
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\$}', trace: true, reporter: reporter)
1692
+ end
1693
+
1694
+ it '&& one digit two wildcards right -> valid' do
1695
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1696
+ expect(parser.marc_spec).to parse('...$/{$a!=$b}', trace: true, reporter: reporter)
1697
+ end
1698
+
1699
+ it '&& one lowercase and two wildcards right -> valid' do
1700
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1701
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\=}', trace: true, reporter: reporter)
1702
+ end
1703
+
1704
+ it '&& one uppercase char two wildcards right -> valid' do
1705
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1706
+ expect(parser.marc_spec).to parse('...$/{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1707
+ end
1708
+
1709
+ it '&& one wildcard between uppercase chars -> valid' do
1710
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1711
+ expect(parser.marc_spec).to parse('...$/{$a}{$b|$c}', trace: true, reporter: reporter)
1712
+ end
1713
+
1714
+ it '&& one wildcard left and two lowercase chars -> valid' do
1715
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1716
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\!}', trace: true, reporter: reporter)
1717
+ end
1718
+
1719
+ it '&& one wildcard left two uppercase chars -> valid' do
1720
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1721
+ expect(parser.marc_spec).to parse('...$/{$a|$b}{$c}', trace: true, reporter: reporter)
1722
+ end
1723
+
1724
+ it '&& one wildcard left with two digits -> valid' do
1725
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1726
+ expect(parser.marc_spec).to parse('...$/{?$a}', trace: true, reporter: reporter)
1727
+ end
1728
+
1729
+ it '&& two digits wildcard right -> valid' do
1730
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1731
+ expect(parser.marc_spec).to parse('...$/{$a=$b}', trace: true, reporter: reporter)
1732
+ end
1733
+
1734
+ it '&& two wildcards and one lowercase char right -> valid' do
1735
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1736
+ expect(parser.marc_spec).to parse('...$/{$a~\\test\\}}', trace: true, reporter: reporter)
1737
+ end
1738
+
1739
+ it '&& two wildcards left one uppercase char -> valid' do
1740
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1741
+ expect(parser.marc_spec).to parse('...$/{/#=\\/}', trace: true, reporter: reporter)
1742
+ end
1743
+
1744
+ it '&& two wildcards left with digit -> valid' do
1745
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1746
+ expect(parser.marc_spec).to parse('...$/{$a}', trace: true, reporter: reporter)
1747
+ end
1748
+
1749
+ it '&& wildcard between digits -> valid' do
1750
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1751
+ expect(parser.marc_spec).to parse('...$/{!$a}', trace: true, reporter: reporter)
1752
+ end
1753
+
1754
+ end
1755
+
1756
+ describe 'subfieldtag :' do
1757
+
1758
+ it '&& all digits -> valid' do
1759
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1760
+ expect(parser.marc_spec).to parse('...$:{$a~\\Poe}', trace: true, reporter: reporter)
1761
+ end
1762
+
1763
+ it '&& all lowercase chars -> valid' do
1764
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1765
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\{}', trace: true, reporter: reporter)
1766
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\~}', trace: true, reporter: reporter)
1767
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\?}', trace: true, reporter: reporter)
1768
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\|}', trace: true, reporter: reporter)
1769
+ end
1770
+
1771
+ it '&& all uppercase chars special leader -> valid' do
1772
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1773
+ expect(parser.marc_spec).to parse('...$:{$a!~\\Poe}', trace: true, reporter: reporter)
1774
+ end
1775
+
1776
+ it '&& all wildcards -> valid' do
1777
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1778
+ expect(parser.marc_spec).to parse('...$:{245$a}', trace: true, reporter: reporter)
1779
+ end
1780
+
1781
+ it '&& mix one lowercase char and two digits -> valid' do
1782
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1783
+ expect(parser.marc_spec).to parse('...$:{$a|$b|$c}', trace: true, reporter: reporter)
1784
+ end
1785
+
1786
+ it '&& mix two lowercase chars and one digit -> valid' do
1787
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1788
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\$}', trace: true, reporter: reporter)
1789
+ end
1790
+
1791
+ it '&& one digit two wildcards right -> valid' do
1792
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1793
+ expect(parser.marc_spec).to parse('...$:{$a!=$b}', trace: true, reporter: reporter)
1794
+ end
1795
+
1796
+ it '&& one lowercase and two wildcards right -> valid' do
1797
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1798
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\=}', trace: true, reporter: reporter)
1799
+ end
1800
+
1801
+ it '&& one uppercase char two wildcards right -> valid' do
1802
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1803
+ expect(parser.marc_spec).to parse('...$:{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1804
+ end
1805
+
1806
+ it '&& one wildcard between uppercase chars -> valid' do
1807
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1808
+ expect(parser.marc_spec).to parse('...$:{$a}{$b|$c}', trace: true, reporter: reporter)
1809
+ end
1810
+
1811
+ it '&& one wildcard left and two lowercase chars -> valid' do
1812
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1813
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\!}', trace: true, reporter: reporter)
1814
+ end
1815
+
1816
+ it '&& one wildcard left two uppercase chars -> valid' do
1817
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1818
+ expect(parser.marc_spec).to parse('...$:{$a|$b}{$c}', trace: true, reporter: reporter)
1819
+ end
1820
+
1821
+ it '&& one wildcard left with two digits -> valid' do
1822
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1823
+ expect(parser.marc_spec).to parse('...$:{?$a}', trace: true, reporter: reporter)
1824
+ end
1825
+
1826
+ it '&& two digits wildcard right -> valid' do
1827
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1828
+ expect(parser.marc_spec).to parse('...$:{$a=$b}', trace: true, reporter: reporter)
1829
+ end
1830
+
1831
+ it '&& two wildcards and one lowercase char right -> valid' do
1832
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1833
+ expect(parser.marc_spec).to parse('...$:{$a~\\test\\}}', trace: true, reporter: reporter)
1834
+ end
1835
+
1836
+ it '&& two wildcards left one uppercase char -> valid' do
1837
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1838
+ expect(parser.marc_spec).to parse('...$:{/#=\\/}', trace: true, reporter: reporter)
1839
+ end
1840
+
1841
+ it '&& two wildcards left with digit -> valid' do
1842
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1843
+ expect(parser.marc_spec).to parse('...$:{$a}', trace: true, reporter: reporter)
1844
+ end
1845
+
1846
+ it '&& wildcard between digits -> valid' do
1847
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1848
+ expect(parser.marc_spec).to parse('...$:{!$a}', trace: true, reporter: reporter)
1849
+ end
1850
+
1851
+ end
1852
+
1853
+ describe 'subfieldtag ;' do
1854
+
1855
+ it '&& all digits -> valid' do
1856
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1857
+ expect(parser.marc_spec).to parse('...$;{$a~\\Poe}', trace: true, reporter: reporter)
1858
+ end
1859
+
1860
+ it '&& all lowercase chars -> valid' do
1861
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1862
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\{}', trace: true, reporter: reporter)
1863
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\~}', trace: true, reporter: reporter)
1864
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\?}', trace: true, reporter: reporter)
1865
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\|}', trace: true, reporter: reporter)
1866
+ end
1867
+
1868
+ it '&& all uppercase chars special leader -> valid' do
1869
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1870
+ expect(parser.marc_spec).to parse('...$;{$a!~\\Poe}', trace: true, reporter: reporter)
1871
+ end
1872
+
1873
+ it '&& all wildcards -> valid' do
1874
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1875
+ expect(parser.marc_spec).to parse('...$;{245$a}', trace: true, reporter: reporter)
1876
+ end
1877
+
1878
+ it '&& mix one lowercase char and two digits -> valid' do
1879
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1880
+ expect(parser.marc_spec).to parse('...$;{$a|$b|$c}', trace: true, reporter: reporter)
1881
+ end
1882
+
1883
+ it '&& mix two lowercase chars and one digit -> valid' do
1884
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1885
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\$}', trace: true, reporter: reporter)
1886
+ end
1887
+
1888
+ it '&& one digit two wildcards right -> valid' do
1889
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1890
+ expect(parser.marc_spec).to parse('...$;{$a!=$b}', trace: true, reporter: reporter)
1891
+ end
1892
+
1893
+ it '&& one lowercase and two wildcards right -> valid' do
1894
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1895
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\=}', trace: true, reporter: reporter)
1896
+ end
1897
+
1898
+ it '&& one uppercase char two wildcards right -> valid' do
1899
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1900
+ expect(parser.marc_spec).to parse('...$;{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1901
+ end
1902
+
1903
+ it '&& one wildcard between uppercase chars -> valid' do
1904
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1905
+ expect(parser.marc_spec).to parse('...$;{$a}{$b|$c}', trace: true, reporter: reporter)
1906
+ end
1907
+
1908
+ it '&& one wildcard left and two lowercase chars -> valid' do
1909
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1910
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\!}', trace: true, reporter: reporter)
1911
+ end
1912
+
1913
+ it '&& one wildcard left two uppercase chars -> valid' do
1914
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1915
+ expect(parser.marc_spec).to parse('...$;{$a|$b}{$c}', trace: true, reporter: reporter)
1916
+ end
1917
+
1918
+ it '&& one wildcard left with two digits -> valid' do
1919
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1920
+ expect(parser.marc_spec).to parse('...$;{?$a}', trace: true, reporter: reporter)
1921
+ end
1922
+
1923
+ it '&& two digits wildcard right -> valid' do
1924
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1925
+ expect(parser.marc_spec).to parse('...$;{$a=$b}', trace: true, reporter: reporter)
1926
+ end
1927
+
1928
+ it '&& two wildcards and one lowercase char right -> valid' do
1929
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1930
+ expect(parser.marc_spec).to parse('...$;{$a~\\test\\}}', trace: true, reporter: reporter)
1931
+ end
1932
+
1933
+ it '&& two wildcards left one uppercase char -> valid' do
1934
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1935
+ expect(parser.marc_spec).to parse('...$;{/#=\\/}', trace: true, reporter: reporter)
1936
+ end
1937
+
1938
+ it '&& two wildcards left with digit -> valid' do
1939
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1940
+ expect(parser.marc_spec).to parse('...$;{$a}', trace: true, reporter: reporter)
1941
+ end
1942
+
1943
+ it '&& wildcard between digits -> valid' do
1944
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1945
+ expect(parser.marc_spec).to parse('...$;{!$a}', trace: true, reporter: reporter)
1946
+ end
1947
+
1948
+ end
1949
+
1950
+ describe 'subfieldtag <' do
1951
+
1952
+ it '&& all digits -> valid' do
1953
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1954
+ expect(parser.marc_spec).to parse('...$<{$a~\\Poe}', trace: true, reporter: reporter)
1955
+ end
1956
+
1957
+ it '&& all lowercase chars -> valid' do
1958
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1959
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\{}', trace: true, reporter: reporter)
1960
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\~}', trace: true, reporter: reporter)
1961
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\?}', trace: true, reporter: reporter)
1962
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\|}', trace: true, reporter: reporter)
1963
+ end
1964
+
1965
+ it '&& all uppercase chars special leader -> valid' do
1966
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1967
+ expect(parser.marc_spec).to parse('...$<{$a!~\\Poe}', trace: true, reporter: reporter)
1968
+ end
1969
+
1970
+ it '&& all wildcards -> valid' do
1971
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1972
+ expect(parser.marc_spec).to parse('...$<{245$a}', trace: true, reporter: reporter)
1973
+ end
1974
+
1975
+ it '&& mix one lowercase char and two digits -> valid' do
1976
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1977
+ expect(parser.marc_spec).to parse('...$<{$a|$b|$c}', trace: true, reporter: reporter)
1978
+ end
1979
+
1980
+ it '&& mix two lowercase chars and one digit -> valid' do
1981
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1982
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\$}', trace: true, reporter: reporter)
1983
+ end
1984
+
1985
+ it '&& one digit two wildcards right -> valid' do
1986
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1987
+ expect(parser.marc_spec).to parse('...$<{$a!=$b}', trace: true, reporter: reporter)
1988
+ end
1989
+
1990
+ it '&& one lowercase and two wildcards right -> valid' do
1991
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1992
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\=}', trace: true, reporter: reporter)
1993
+ end
1994
+
1995
+ it '&& one uppercase char two wildcards right -> valid' do
1996
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
1997
+ expect(parser.marc_spec).to parse('...$<{$a|$b}{$c|$d}', trace: true, reporter: reporter)
1998
+ end
1999
+
2000
+ it '&& one wildcard between uppercase chars -> valid' do
2001
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2002
+ expect(parser.marc_spec).to parse('...$<{$a}{$b|$c}', trace: true, reporter: reporter)
2003
+ end
2004
+
2005
+ it '&& one wildcard left and two lowercase chars -> valid' do
2006
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2007
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\!}', trace: true, reporter: reporter)
2008
+ end
2009
+
2010
+ it '&& one wildcard left two uppercase chars -> valid' do
2011
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2012
+ expect(parser.marc_spec).to parse('...$<{$a|$b}{$c}', trace: true, reporter: reporter)
2013
+ end
2014
+
2015
+ it '&& one wildcard left with two digits -> valid' do
2016
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2017
+ expect(parser.marc_spec).to parse('...$<{?$a}', trace: true, reporter: reporter)
2018
+ end
2019
+
2020
+ it '&& two digits wildcard right -> valid' do
2021
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2022
+ expect(parser.marc_spec).to parse('...$<{$a=$b}', trace: true, reporter: reporter)
2023
+ end
2024
+
2025
+ it '&& two wildcards and one lowercase char right -> valid' do
2026
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2027
+ expect(parser.marc_spec).to parse('...$<{$a~\\test\\}}', trace: true, reporter: reporter)
2028
+ end
2029
+
2030
+ it '&& two wildcards left one uppercase char -> valid' do
2031
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2032
+ expect(parser.marc_spec).to parse('...$<{/#=\\/}', trace: true, reporter: reporter)
2033
+ end
2034
+
2035
+ it '&& two wildcards left with digit -> valid' do
2036
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2037
+ expect(parser.marc_spec).to parse('...$<{$a}', trace: true, reporter: reporter)
2038
+ end
2039
+
2040
+ it '&& wildcard between digits -> valid' do
2041
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2042
+ expect(parser.marc_spec).to parse('...$<{!$a}', trace: true, reporter: reporter)
2043
+ end
2044
+
2045
+ end
2046
+
2047
+ describe 'subfieldtag =' do
2048
+
2049
+ it '&& all digits -> valid' do
2050
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2051
+ expect(parser.marc_spec).to parse('...$={$a~\\Poe}', trace: true, reporter: reporter)
2052
+ end
2053
+
2054
+ it '&& all lowercase chars -> valid' do
2055
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2056
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\{}', trace: true, reporter: reporter)
2057
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\~}', trace: true, reporter: reporter)
2058
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\?}', trace: true, reporter: reporter)
2059
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\|}', trace: true, reporter: reporter)
2060
+ end
2061
+
2062
+ it '&& all uppercase chars special leader -> valid' do
2063
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2064
+ expect(parser.marc_spec).to parse('...$={$a!~\\Poe}', trace: true, reporter: reporter)
2065
+ end
2066
+
2067
+ it '&& all wildcards -> valid' do
2068
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2069
+ expect(parser.marc_spec).to parse('...$={245$a}', trace: true, reporter: reporter)
2070
+ end
2071
+
2072
+ it '&& mix one lowercase char and two digits -> valid' do
2073
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2074
+ expect(parser.marc_spec).to parse('...$={$a|$b|$c}', trace: true, reporter: reporter)
2075
+ end
2076
+
2077
+ it '&& mix two lowercase chars and one digit -> valid' do
2078
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2079
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\$}', trace: true, reporter: reporter)
2080
+ end
2081
+
2082
+ it '&& one digit two wildcards right -> valid' do
2083
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2084
+ expect(parser.marc_spec).to parse('...$={$a!=$b}', trace: true, reporter: reporter)
2085
+ end
2086
+
2087
+ it '&& one lowercase and two wildcards right -> valid' do
2088
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2089
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\=}', trace: true, reporter: reporter)
2090
+ end
2091
+
2092
+ it '&& one uppercase char two wildcards right -> valid' do
2093
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2094
+ expect(parser.marc_spec).to parse('...$={$a|$b}{$c|$d}', trace: true, reporter: reporter)
2095
+ end
2096
+
2097
+ it '&& one wildcard between uppercase chars -> valid' do
2098
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2099
+ expect(parser.marc_spec).to parse('...$={$a}{$b|$c}', trace: true, reporter: reporter)
2100
+ end
2101
+
2102
+ it '&& one wildcard left and two lowercase chars -> valid' do
2103
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2104
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\!}', trace: true, reporter: reporter)
2105
+ end
2106
+
2107
+ it '&& one wildcard left two uppercase chars -> valid' do
2108
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2109
+ expect(parser.marc_spec).to parse('...$={$a|$b}{$c}', trace: true, reporter: reporter)
2110
+ end
2111
+
2112
+ it '&& one wildcard left with two digits -> valid' do
2113
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2114
+ expect(parser.marc_spec).to parse('...$={?$a}', trace: true, reporter: reporter)
2115
+ end
2116
+
2117
+ it '&& two digits wildcard right -> valid' do
2118
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2119
+ expect(parser.marc_spec).to parse('...$={$a=$b}', trace: true, reporter: reporter)
2120
+ end
2121
+
2122
+ it '&& two wildcards and one lowercase char right -> valid' do
2123
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2124
+ expect(parser.marc_spec).to parse('...$={$a~\\test\\}}', trace: true, reporter: reporter)
2125
+ end
2126
+
2127
+ it '&& two wildcards left one uppercase char -> valid' do
2128
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2129
+ expect(parser.marc_spec).to parse('...$={/#=\\/}', trace: true, reporter: reporter)
2130
+ end
2131
+
2132
+ it '&& two wildcards left with digit -> valid' do
2133
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2134
+ expect(parser.marc_spec).to parse('...$={$a}', trace: true, reporter: reporter)
2135
+ end
2136
+
2137
+ it '&& wildcard between digits -> valid' do
2138
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2139
+ expect(parser.marc_spec).to parse('...$={!$a}', trace: true, reporter: reporter)
2140
+ end
2141
+
2142
+ end
2143
+
2144
+ describe 'subfieldtag >' do
2145
+
2146
+ it '&& all digits -> valid' do
2147
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2148
+ expect(parser.marc_spec).to parse('...$>{$a~\\Poe}', trace: true, reporter: reporter)
2149
+ end
2150
+
2151
+ it '&& all lowercase chars -> valid' do
2152
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2153
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\{}', trace: true, reporter: reporter)
2154
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\~}', trace: true, reporter: reporter)
2155
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\?}', trace: true, reporter: reporter)
2156
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\|}', trace: true, reporter: reporter)
2157
+ end
2158
+
2159
+ it '&& all uppercase chars special leader -> valid' do
2160
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2161
+ expect(parser.marc_spec).to parse('...$>{$a!~\\Poe}', trace: true, reporter: reporter)
2162
+ end
2163
+
2164
+ it '&& all wildcards -> valid' do
2165
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2166
+ expect(parser.marc_spec).to parse('...$>{245$a}', trace: true, reporter: reporter)
2167
+ end
2168
+
2169
+ it '&& mix one lowercase char and two digits -> valid' do
2170
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2171
+ expect(parser.marc_spec).to parse('...$>{$a|$b|$c}', trace: true, reporter: reporter)
2172
+ end
2173
+
2174
+ it '&& mix two lowercase chars and one digit -> valid' do
2175
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2176
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\$}', trace: true, reporter: reporter)
2177
+ end
2178
+
2179
+ it '&& one digit two wildcards right -> valid' do
2180
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2181
+ expect(parser.marc_spec).to parse('...$>{$a!=$b}', trace: true, reporter: reporter)
2182
+ end
2183
+
2184
+ it '&& one lowercase and two wildcards right -> valid' do
2185
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2186
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\=}', trace: true, reporter: reporter)
2187
+ end
2188
+
2189
+ it '&& one uppercase char two wildcards right -> valid' do
2190
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2191
+ expect(parser.marc_spec).to parse('...$>{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2192
+ end
2193
+
2194
+ it '&& one wildcard between uppercase chars -> valid' do
2195
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2196
+ expect(parser.marc_spec).to parse('...$>{$a}{$b|$c}', trace: true, reporter: reporter)
2197
+ end
2198
+
2199
+ it '&& one wildcard left and two lowercase chars -> valid' do
2200
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2201
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\!}', trace: true, reporter: reporter)
2202
+ end
2203
+
2204
+ it '&& one wildcard left two uppercase chars -> valid' do
2205
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2206
+ expect(parser.marc_spec).to parse('...$>{$a|$b}{$c}', trace: true, reporter: reporter)
2207
+ end
2208
+
2209
+ it '&& one wildcard left with two digits -> valid' do
2210
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2211
+ expect(parser.marc_spec).to parse('...$>{?$a}', trace: true, reporter: reporter)
2212
+ end
2213
+
2214
+ it '&& two digits wildcard right -> valid' do
2215
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2216
+ expect(parser.marc_spec).to parse('...$>{$a=$b}', trace: true, reporter: reporter)
2217
+ end
2218
+
2219
+ it '&& two wildcards and one lowercase char right -> valid' do
2220
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2221
+ expect(parser.marc_spec).to parse('...$>{$a~\\test\\}}', trace: true, reporter: reporter)
2222
+ end
2223
+
2224
+ it '&& two wildcards left one uppercase char -> valid' do
2225
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2226
+ expect(parser.marc_spec).to parse('...$>{/#=\\/}', trace: true, reporter: reporter)
2227
+ end
2228
+
2229
+ it '&& two wildcards left with digit -> valid' do
2230
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2231
+ expect(parser.marc_spec).to parse('...$>{$a}', trace: true, reporter: reporter)
2232
+ end
2233
+
2234
+ it '&& wildcard between digits -> valid' do
2235
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2236
+ expect(parser.marc_spec).to parse('...$>{!$a}', trace: true, reporter: reporter)
2237
+ end
2238
+
2239
+ end
2240
+
2241
+ describe 'subfieldtag ?' do
2242
+
2243
+ it '&& all digits -> valid' do
2244
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2245
+ expect(parser.marc_spec).to parse('...$?{$a~\\Poe}', trace: true, reporter: reporter)
2246
+ end
2247
+
2248
+ it '&& all lowercase chars -> valid' do
2249
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2250
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\{}', trace: true, reporter: reporter)
2251
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\~}', trace: true, reporter: reporter)
2252
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\?}', trace: true, reporter: reporter)
2253
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\|}', trace: true, reporter: reporter)
2254
+ end
2255
+
2256
+ it '&& all uppercase chars special leader -> valid' do
2257
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2258
+ expect(parser.marc_spec).to parse('...$?{$a!~\\Poe}', trace: true, reporter: reporter)
2259
+ end
2260
+
2261
+ it '&& all wildcards -> valid' do
2262
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2263
+ expect(parser.marc_spec).to parse('...$?{245$a}', trace: true, reporter: reporter)
2264
+ end
2265
+
2266
+ it '&& mix one lowercase char and two digits -> valid' do
2267
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2268
+ expect(parser.marc_spec).to parse('...$?{$a|$b|$c}', trace: true, reporter: reporter)
2269
+ end
2270
+
2271
+ it '&& mix two lowercase chars and one digit -> valid' do
2272
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2273
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\$}', trace: true, reporter: reporter)
2274
+ end
2275
+
2276
+ it '&& one digit two wildcards right -> valid' do
2277
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2278
+ expect(parser.marc_spec).to parse('...$?{$a!=$b}', trace: true, reporter: reporter)
2279
+ end
2280
+
2281
+ it '&& one lowercase and two wildcards right -> valid' do
2282
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2283
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\=}', trace: true, reporter: reporter)
2284
+ end
2285
+
2286
+ it '&& one uppercase char two wildcards right -> valid' do
2287
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2288
+ expect(parser.marc_spec).to parse('...$?{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2289
+ end
2290
+
2291
+ it '&& one wildcard between uppercase chars -> valid' do
2292
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2293
+ expect(parser.marc_spec).to parse('...$?{$a}{$b|$c}', trace: true, reporter: reporter)
2294
+ end
2295
+
2296
+ it '&& one wildcard left and two lowercase chars -> valid' do
2297
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2298
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\!}', trace: true, reporter: reporter)
2299
+ end
2300
+
2301
+ it '&& one wildcard left two uppercase chars -> valid' do
2302
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2303
+ expect(parser.marc_spec).to parse('...$?{$a|$b}{$c}', trace: true, reporter: reporter)
2304
+ end
2305
+
2306
+ it '&& one wildcard left with two digits -> valid' do
2307
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2308
+ expect(parser.marc_spec).to parse('...$?{?$a}', trace: true, reporter: reporter)
2309
+ end
2310
+
2311
+ it '&& two digits wildcard right -> valid' do
2312
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2313
+ expect(parser.marc_spec).to parse('...$?{$a=$b}', trace: true, reporter: reporter)
2314
+ end
2315
+
2316
+ it '&& two wildcards and one lowercase char right -> valid' do
2317
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2318
+ expect(parser.marc_spec).to parse('...$?{$a~\\test\\}}', trace: true, reporter: reporter)
2319
+ end
2320
+
2321
+ it '&& two wildcards left one uppercase char -> valid' do
2322
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2323
+ expect(parser.marc_spec).to parse('...$?{/#=\\/}', trace: true, reporter: reporter)
2324
+ end
2325
+
2326
+ it '&& two wildcards left with digit -> valid' do
2327
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2328
+ expect(parser.marc_spec).to parse('...$?{$a}', trace: true, reporter: reporter)
2329
+ end
2330
+
2331
+ it '&& wildcard between digits -> valid' do
2332
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2333
+ expect(parser.marc_spec).to parse('...$?{!$a}', trace: true, reporter: reporter)
2334
+ end
2335
+
2336
+ end
2337
+
2338
+ describe 'subfieldtag [' do
2339
+
2340
+ it '&& all digits -> valid' do
2341
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2342
+ expect(parser.marc_spec).to parse('...$[{$a~\\Poe}', trace: true, reporter: reporter)
2343
+ end
2344
+
2345
+ it '&& all lowercase chars -> valid' do
2346
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2347
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\{}', trace: true, reporter: reporter)
2348
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\~}', trace: true, reporter: reporter)
2349
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\?}', trace: true, reporter: reporter)
2350
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\|}', trace: true, reporter: reporter)
2351
+ end
2352
+
2353
+ it '&& all uppercase chars special leader -> valid' do
2354
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2355
+ expect(parser.marc_spec).to parse('...$[{$a!~\\Poe}', trace: true, reporter: reporter)
2356
+ end
2357
+
2358
+ it '&& all wildcards -> valid' do
2359
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2360
+ expect(parser.marc_spec).to parse('...$[{245$a}', trace: true, reporter: reporter)
2361
+ end
2362
+
2363
+ it '&& mix one lowercase char and two digits -> valid' do
2364
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2365
+ expect(parser.marc_spec).to parse('...$[{$a|$b|$c}', trace: true, reporter: reporter)
2366
+ end
2367
+
2368
+ it '&& mix two lowercase chars and one digit -> valid' do
2369
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2370
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\$}', trace: true, reporter: reporter)
2371
+ end
2372
+
2373
+ it '&& one digit two wildcards right -> valid' do
2374
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2375
+ expect(parser.marc_spec).to parse('...$[{$a!=$b}', trace: true, reporter: reporter)
2376
+ end
2377
+
2378
+ it '&& one lowercase and two wildcards right -> valid' do
2379
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2380
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\=}', trace: true, reporter: reporter)
2381
+ end
2382
+
2383
+ it '&& one uppercase char two wildcards right -> valid' do
2384
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2385
+ expect(parser.marc_spec).to parse('...$[{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2386
+ end
2387
+
2388
+ it '&& one wildcard between uppercase chars -> valid' do
2389
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2390
+ expect(parser.marc_spec).to parse('...$[{$a}{$b|$c}', trace: true, reporter: reporter)
2391
+ end
2392
+
2393
+ it '&& one wildcard left and two lowercase chars -> valid' do
2394
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2395
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\!}', trace: true, reporter: reporter)
2396
+ end
2397
+
2398
+ it '&& one wildcard left two uppercase chars -> valid' do
2399
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2400
+ expect(parser.marc_spec).to parse('...$[{$a|$b}{$c}', trace: true, reporter: reporter)
2401
+ end
2402
+
2403
+ it '&& one wildcard left with two digits -> valid' do
2404
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2405
+ expect(parser.marc_spec).to parse('...$[{?$a}', trace: true, reporter: reporter)
2406
+ end
2407
+
2408
+ it '&& two digits wildcard right -> valid' do
2409
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2410
+ expect(parser.marc_spec).to parse('...$[{$a=$b}', trace: true, reporter: reporter)
2411
+ end
2412
+
2413
+ it '&& two wildcards and one lowercase char right -> valid' do
2414
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2415
+ expect(parser.marc_spec).to parse('...$[{$a~\\test\\}}', trace: true, reporter: reporter)
2416
+ end
2417
+
2418
+ it '&& two wildcards left one uppercase char -> valid' do
2419
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2420
+ expect(parser.marc_spec).to parse('...$[{/#=\\/}', trace: true, reporter: reporter)
2421
+ end
2422
+
2423
+ it '&& two wildcards left with digit -> valid' do
2424
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2425
+ expect(parser.marc_spec).to parse('...$[{$a}', trace: true, reporter: reporter)
2426
+ end
2427
+
2428
+ it '&& wildcard between digits -> valid' do
2429
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2430
+ expect(parser.marc_spec).to parse('...$[{!$a}', trace: true, reporter: reporter)
2431
+ end
2432
+
2433
+ end
2434
+
2435
+ describe 'subfieldtag \\' do
2436
+
2437
+ it '&& all digits -> valid' do
2438
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2439
+ expect(parser.marc_spec).to parse('...$\\{$a~\\Poe}', trace: true, reporter: reporter)
2440
+ end
2441
+
2442
+ it '&& all lowercase chars -> valid' do
2443
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2444
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\{}', trace: true, reporter: reporter)
2445
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\~}', trace: true, reporter: reporter)
2446
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\?}', trace: true, reporter: reporter)
2447
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\|}', trace: true, reporter: reporter)
2448
+ end
2449
+
2450
+ it '&& all uppercase chars special leader -> valid' do
2451
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2452
+ expect(parser.marc_spec).to parse('...$\\{$a!~\\Poe}', trace: true, reporter: reporter)
2453
+ end
2454
+
2455
+ it '&& all wildcards -> valid' do
2456
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2457
+ expect(parser.marc_spec).to parse('...$\\{245$a}', trace: true, reporter: reporter)
2458
+ end
2459
+
2460
+ it '&& mix one lowercase char and two digits -> valid' do
2461
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2462
+ expect(parser.marc_spec).to parse('...$\\{$a|$b|$c}', trace: true, reporter: reporter)
2463
+ end
2464
+
2465
+ it '&& mix two lowercase chars and one digit -> valid' do
2466
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2467
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\$}', trace: true, reporter: reporter)
2468
+ end
2469
+
2470
+ it '&& one digit two wildcards right -> valid' do
2471
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2472
+ expect(parser.marc_spec).to parse('...$\\{$a!=$b}', trace: true, reporter: reporter)
2473
+ end
2474
+
2475
+ it '&& one lowercase and two wildcards right -> valid' do
2476
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2477
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\=}', trace: true, reporter: reporter)
2478
+ end
2479
+
2480
+ it '&& one uppercase char two wildcards right -> valid' do
2481
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2482
+ expect(parser.marc_spec).to parse('...$\\{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2483
+ end
2484
+
2485
+ it '&& one wildcard between uppercase chars -> valid' do
2486
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2487
+ expect(parser.marc_spec).to parse('...$\\{$a}{$b|$c}', trace: true, reporter: reporter)
2488
+ end
2489
+
2490
+ it '&& one wildcard left and two lowercase chars -> valid' do
2491
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2492
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\!}', trace: true, reporter: reporter)
2493
+ end
2494
+
2495
+ it '&& one wildcard left two uppercase chars -> valid' do
2496
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2497
+ expect(parser.marc_spec).to parse('...$\\{$a|$b}{$c}', trace: true, reporter: reporter)
2498
+ end
2499
+
2500
+ it '&& one wildcard left with two digits -> valid' do
2501
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2502
+ expect(parser.marc_spec).to parse('...$\\{?$a}', trace: true, reporter: reporter)
2503
+ end
2504
+
2505
+ it '&& two digits wildcard right -> valid' do
2506
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2507
+ expect(parser.marc_spec).to parse('...$\\{$a=$b}', trace: true, reporter: reporter)
2508
+ end
2509
+
2510
+ it '&& two wildcards and one lowercase char right -> valid' do
2511
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2512
+ expect(parser.marc_spec).to parse('...$\\{$a~\\test\\}}', trace: true, reporter: reporter)
2513
+ end
2514
+
2515
+ it '&& two wildcards left one uppercase char -> valid' do
2516
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2517
+ expect(parser.marc_spec).to parse('...$\\{/#=\\/}', trace: true, reporter: reporter)
2518
+ end
2519
+
2520
+ it '&& two wildcards left with digit -> valid' do
2521
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2522
+ expect(parser.marc_spec).to parse('...$\\{$a}', trace: true, reporter: reporter)
2523
+ end
2524
+
2525
+ it '&& wildcard between digits -> valid' do
2526
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2527
+ expect(parser.marc_spec).to parse('...$\\{!$a}', trace: true, reporter: reporter)
2528
+ end
2529
+
2530
+ end
2531
+
2532
+ describe 'subfieldtag ]' do
2533
+
2534
+ it '&& all digits -> valid' do
2535
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2536
+ expect(parser.marc_spec).to parse('...$]{$a~\\Poe}', trace: true, reporter: reporter)
2537
+ end
2538
+
2539
+ it '&& all lowercase chars -> valid' do
2540
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2541
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\{}', trace: true, reporter: reporter)
2542
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\~}', trace: true, reporter: reporter)
2543
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\?}', trace: true, reporter: reporter)
2544
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\|}', trace: true, reporter: reporter)
2545
+ end
2546
+
2547
+ it '&& all uppercase chars special leader -> valid' do
2548
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2549
+ expect(parser.marc_spec).to parse('...$]{$a!~\\Poe}', trace: true, reporter: reporter)
2550
+ end
2551
+
2552
+ it '&& all wildcards -> valid' do
2553
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2554
+ expect(parser.marc_spec).to parse('...$]{245$a}', trace: true, reporter: reporter)
2555
+ end
2556
+
2557
+ it '&& mix one lowercase char and two digits -> valid' do
2558
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2559
+ expect(parser.marc_spec).to parse('...$]{$a|$b|$c}', trace: true, reporter: reporter)
2560
+ end
2561
+
2562
+ it '&& mix two lowercase chars and one digit -> valid' do
2563
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2564
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\$}', trace: true, reporter: reporter)
2565
+ end
2566
+
2567
+ it '&& one digit two wildcards right -> valid' do
2568
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2569
+ expect(parser.marc_spec).to parse('...$]{$a!=$b}', trace: true, reporter: reporter)
2570
+ end
2571
+
2572
+ it '&& one lowercase and two wildcards right -> valid' do
2573
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2574
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\=}', trace: true, reporter: reporter)
2575
+ end
2576
+
2577
+ it '&& one uppercase char two wildcards right -> valid' do
2578
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2579
+ expect(parser.marc_spec).to parse('...$]{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2580
+ end
2581
+
2582
+ it '&& one wildcard between uppercase chars -> valid' do
2583
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2584
+ expect(parser.marc_spec).to parse('...$]{$a}{$b|$c}', trace: true, reporter: reporter)
2585
+ end
2586
+
2587
+ it '&& one wildcard left and two lowercase chars -> valid' do
2588
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2589
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\!}', trace: true, reporter: reporter)
2590
+ end
2591
+
2592
+ it '&& one wildcard left two uppercase chars -> valid' do
2593
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2594
+ expect(parser.marc_spec).to parse('...$]{$a|$b}{$c}', trace: true, reporter: reporter)
2595
+ end
2596
+
2597
+ it '&& one wildcard left with two digits -> valid' do
2598
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2599
+ expect(parser.marc_spec).to parse('...$]{?$a}', trace: true, reporter: reporter)
2600
+ end
2601
+
2602
+ it '&& two digits wildcard right -> valid' do
2603
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2604
+ expect(parser.marc_spec).to parse('...$]{$a=$b}', trace: true, reporter: reporter)
2605
+ end
2606
+
2607
+ it '&& two wildcards and one lowercase char right -> valid' do
2608
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2609
+ expect(parser.marc_spec).to parse('...$]{$a~\\test\\}}', trace: true, reporter: reporter)
2610
+ end
2611
+
2612
+ it '&& two wildcards left one uppercase char -> valid' do
2613
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2614
+ expect(parser.marc_spec).to parse('...$]{/#=\\/}', trace: true, reporter: reporter)
2615
+ end
2616
+
2617
+ it '&& two wildcards left with digit -> valid' do
2618
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2619
+ expect(parser.marc_spec).to parse('...$]{$a}', trace: true, reporter: reporter)
2620
+ end
2621
+
2622
+ it '&& wildcard between digits -> valid' do
2623
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2624
+ expect(parser.marc_spec).to parse('...$]{!$a}', trace: true, reporter: reporter)
2625
+ end
2626
+
2627
+ end
2628
+
2629
+ describe 'subfieldtag ^' do
2630
+
2631
+ it '&& all digits -> valid' do
2632
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2633
+ expect(parser.marc_spec).to parse('...$^{$a~\\Poe}', trace: true, reporter: reporter)
2634
+ end
2635
+
2636
+ it '&& all lowercase chars -> valid' do
2637
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2638
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\{}', trace: true, reporter: reporter)
2639
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\~}', trace: true, reporter: reporter)
2640
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\?}', trace: true, reporter: reporter)
2641
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\|}', trace: true, reporter: reporter)
2642
+ end
2643
+
2644
+ it '&& all uppercase chars special leader -> valid' do
2645
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2646
+ expect(parser.marc_spec).to parse('...$^{$a!~\\Poe}', trace: true, reporter: reporter)
2647
+ end
2648
+
2649
+ it '&& all wildcards -> valid' do
2650
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2651
+ expect(parser.marc_spec).to parse('...$^{245$a}', trace: true, reporter: reporter)
2652
+ end
2653
+
2654
+ it '&& mix one lowercase char and two digits -> valid' do
2655
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2656
+ expect(parser.marc_spec).to parse('...$^{$a|$b|$c}', trace: true, reporter: reporter)
2657
+ end
2658
+
2659
+ it '&& mix two lowercase chars and one digit -> valid' do
2660
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2661
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\$}', trace: true, reporter: reporter)
2662
+ end
2663
+
2664
+ it '&& one digit two wildcards right -> valid' do
2665
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2666
+ expect(parser.marc_spec).to parse('...$^{$a!=$b}', trace: true, reporter: reporter)
2667
+ end
2668
+
2669
+ it '&& one lowercase and two wildcards right -> valid' do
2670
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2671
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\=}', trace: true, reporter: reporter)
2672
+ end
2673
+
2674
+ it '&& one uppercase char two wildcards right -> valid' do
2675
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2676
+ expect(parser.marc_spec).to parse('...$^{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2677
+ end
2678
+
2679
+ it '&& one wildcard between uppercase chars -> valid' do
2680
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2681
+ expect(parser.marc_spec).to parse('...$^{$a}{$b|$c}', trace: true, reporter: reporter)
2682
+ end
2683
+
2684
+ it '&& one wildcard left and two lowercase chars -> valid' do
2685
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2686
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\!}', trace: true, reporter: reporter)
2687
+ end
2688
+
2689
+ it '&& one wildcard left two uppercase chars -> valid' do
2690
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2691
+ expect(parser.marc_spec).to parse('...$^{$a|$b}{$c}', trace: true, reporter: reporter)
2692
+ end
2693
+
2694
+ it '&& one wildcard left with two digits -> valid' do
2695
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2696
+ expect(parser.marc_spec).to parse('...$^{?$a}', trace: true, reporter: reporter)
2697
+ end
2698
+
2699
+ it '&& two digits wildcard right -> valid' do
2700
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2701
+ expect(parser.marc_spec).to parse('...$^{$a=$b}', trace: true, reporter: reporter)
2702
+ end
2703
+
2704
+ it '&& two wildcards and one lowercase char right -> valid' do
2705
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2706
+ expect(parser.marc_spec).to parse('...$^{$a~\\test\\}}', trace: true, reporter: reporter)
2707
+ end
2708
+
2709
+ it '&& two wildcards left one uppercase char -> valid' do
2710
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2711
+ expect(parser.marc_spec).to parse('...$^{/#=\\/}', trace: true, reporter: reporter)
2712
+ end
2713
+
2714
+ it '&& two wildcards left with digit -> valid' do
2715
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2716
+ expect(parser.marc_spec).to parse('...$^{$a}', trace: true, reporter: reporter)
2717
+ end
2718
+
2719
+ it '&& wildcard between digits -> valid' do
2720
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2721
+ expect(parser.marc_spec).to parse('...$^{!$a}', trace: true, reporter: reporter)
2722
+ end
2723
+
2724
+ end
2725
+
2726
+ describe 'subfieldtag _' do
2727
+
2728
+ it '&& all digits -> valid' do
2729
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2730
+ expect(parser.marc_spec).to parse('...$_{$a~\\Poe}', trace: true, reporter: reporter)
2731
+ end
2732
+
2733
+ it '&& all lowercase chars -> valid' do
2734
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2735
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\{}', trace: true, reporter: reporter)
2736
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\~}', trace: true, reporter: reporter)
2737
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\?}', trace: true, reporter: reporter)
2738
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\|}', trace: true, reporter: reporter)
2739
+ end
2740
+
2741
+ it '&& all uppercase chars special leader -> valid' do
2742
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2743
+ expect(parser.marc_spec).to parse('...$_{$a!~\\Poe}', trace: true, reporter: reporter)
2744
+ end
2745
+
2746
+ it '&& all wildcards -> valid' do
2747
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2748
+ expect(parser.marc_spec).to parse('...$_{245$a}', trace: true, reporter: reporter)
2749
+ end
2750
+
2751
+ it '&& mix one lowercase char and two digits -> valid' do
2752
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2753
+ expect(parser.marc_spec).to parse('...$_{$a|$b|$c}', trace: true, reporter: reporter)
2754
+ end
2755
+
2756
+ it '&& mix two lowercase chars and one digit -> valid' do
2757
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2758
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\$}', trace: true, reporter: reporter)
2759
+ end
2760
+
2761
+ it '&& one digit two wildcards right -> valid' do
2762
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2763
+ expect(parser.marc_spec).to parse('...$_{$a!=$b}', trace: true, reporter: reporter)
2764
+ end
2765
+
2766
+ it '&& one lowercase and two wildcards right -> valid' do
2767
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2768
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\=}', trace: true, reporter: reporter)
2769
+ end
2770
+
2771
+ it '&& one uppercase char two wildcards right -> valid' do
2772
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2773
+ expect(parser.marc_spec).to parse('...$_{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2774
+ end
2775
+
2776
+ it '&& one wildcard between uppercase chars -> valid' do
2777
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2778
+ expect(parser.marc_spec).to parse('...$_{$a}{$b|$c}', trace: true, reporter: reporter)
2779
+ end
2780
+
2781
+ it '&& one wildcard left and two lowercase chars -> valid' do
2782
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2783
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\!}', trace: true, reporter: reporter)
2784
+ end
2785
+
2786
+ it '&& one wildcard left two uppercase chars -> valid' do
2787
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2788
+ expect(parser.marc_spec).to parse('...$_{$a|$b}{$c}', trace: true, reporter: reporter)
2789
+ end
2790
+
2791
+ it '&& one wildcard left with two digits -> valid' do
2792
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2793
+ expect(parser.marc_spec).to parse('...$_{?$a}', trace: true, reporter: reporter)
2794
+ end
2795
+
2796
+ it '&& two digits wildcard right -> valid' do
2797
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2798
+ expect(parser.marc_spec).to parse('...$_{$a=$b}', trace: true, reporter: reporter)
2799
+ end
2800
+
2801
+ it '&& two wildcards and one lowercase char right -> valid' do
2802
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2803
+ expect(parser.marc_spec).to parse('...$_{$a~\\test\\}}', trace: true, reporter: reporter)
2804
+ end
2805
+
2806
+ it '&& two wildcards left one uppercase char -> valid' do
2807
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2808
+ expect(parser.marc_spec).to parse('...$_{/#=\\/}', trace: true, reporter: reporter)
2809
+ end
2810
+
2811
+ it '&& two wildcards left with digit -> valid' do
2812
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2813
+ expect(parser.marc_spec).to parse('...$_{$a}', trace: true, reporter: reporter)
2814
+ end
2815
+
2816
+ it '&& wildcard between digits -> valid' do
2817
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2818
+ expect(parser.marc_spec).to parse('...$_{!$a}', trace: true, reporter: reporter)
2819
+ end
2820
+
2821
+ end
2822
+
2823
+ describe 'subfieldtag `' do
2824
+
2825
+ it '&& all digits -> valid' do
2826
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2827
+ expect(parser.marc_spec).to parse('...$`{$a~\\Poe}', trace: true, reporter: reporter)
2828
+ end
2829
+
2830
+ it '&& all lowercase chars -> valid' do
2831
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2832
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\{}', trace: true, reporter: reporter)
2833
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\~}', trace: true, reporter: reporter)
2834
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\?}', trace: true, reporter: reporter)
2835
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\|}', trace: true, reporter: reporter)
2836
+ end
2837
+
2838
+ it '&& all uppercase chars special leader -> valid' do
2839
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2840
+ expect(parser.marc_spec).to parse('...$`{$a!~\\Poe}', trace: true, reporter: reporter)
2841
+ end
2842
+
2843
+ it '&& all wildcards -> valid' do
2844
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2845
+ expect(parser.marc_spec).to parse('...$`{245$a}', trace: true, reporter: reporter)
2846
+ end
2847
+
2848
+ it '&& mix one lowercase char and two digits -> valid' do
2849
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2850
+ expect(parser.marc_spec).to parse('...$`{$a|$b|$c}', trace: true, reporter: reporter)
2851
+ end
2852
+
2853
+ it '&& mix two lowercase chars and one digit -> valid' do
2854
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2855
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\$}', trace: true, reporter: reporter)
2856
+ end
2857
+
2858
+ it '&& one digit two wildcards right -> valid' do
2859
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2860
+ expect(parser.marc_spec).to parse('...$`{$a!=$b}', trace: true, reporter: reporter)
2861
+ end
2862
+
2863
+ it '&& one lowercase and two wildcards right -> valid' do
2864
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2865
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\=}', trace: true, reporter: reporter)
2866
+ end
2867
+
2868
+ it '&& one uppercase char two wildcards right -> valid' do
2869
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2870
+ expect(parser.marc_spec).to parse('...$`{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2871
+ end
2872
+
2873
+ it '&& one wildcard between uppercase chars -> valid' do
2874
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2875
+ expect(parser.marc_spec).to parse('...$`{$a}{$b|$c}', trace: true, reporter: reporter)
2876
+ end
2877
+
2878
+ it '&& one wildcard left and two lowercase chars -> valid' do
2879
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2880
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\!}', trace: true, reporter: reporter)
2881
+ end
2882
+
2883
+ it '&& one wildcard left two uppercase chars -> valid' do
2884
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2885
+ expect(parser.marc_spec).to parse('...$`{$a|$b}{$c}', trace: true, reporter: reporter)
2886
+ end
2887
+
2888
+ it '&& one wildcard left with two digits -> valid' do
2889
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2890
+ expect(parser.marc_spec).to parse('...$`{?$a}', trace: true, reporter: reporter)
2891
+ end
2892
+
2893
+ it '&& two digits wildcard right -> valid' do
2894
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2895
+ expect(parser.marc_spec).to parse('...$`{$a=$b}', trace: true, reporter: reporter)
2896
+ end
2897
+
2898
+ it '&& two wildcards and one lowercase char right -> valid' do
2899
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2900
+ expect(parser.marc_spec).to parse('...$`{$a~\\test\\}}', trace: true, reporter: reporter)
2901
+ end
2902
+
2903
+ it '&& two wildcards left one uppercase char -> valid' do
2904
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2905
+ expect(parser.marc_spec).to parse('...$`{/#=\\/}', trace: true, reporter: reporter)
2906
+ end
2907
+
2908
+ it '&& two wildcards left with digit -> valid' do
2909
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2910
+ expect(parser.marc_spec).to parse('...$`{$a}', trace: true, reporter: reporter)
2911
+ end
2912
+
2913
+ it '&& wildcard between digits -> valid' do
2914
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2915
+ expect(parser.marc_spec).to parse('...$`{!$a}', trace: true, reporter: reporter)
2916
+ end
2917
+
2918
+ end
2919
+
2920
+ describe 'subfieldtag {' do
2921
+
2922
+ it '&& all digits -> valid' do
2923
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2924
+ expect(parser.marc_spec).to parse('...${{$a~\\Poe}', trace: true, reporter: reporter)
2925
+ end
2926
+
2927
+ it '&& all lowercase chars -> valid' do
2928
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2929
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\{}', trace: true, reporter: reporter)
2930
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\~}', trace: true, reporter: reporter)
2931
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\?}', trace: true, reporter: reporter)
2932
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\|}', trace: true, reporter: reporter)
2933
+ end
2934
+
2935
+ it '&& all uppercase chars special leader -> valid' do
2936
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2937
+ expect(parser.marc_spec).to parse('...${{$a!~\\Poe}', trace: true, reporter: reporter)
2938
+ end
2939
+
2940
+ it '&& all wildcards -> valid' do
2941
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2942
+ expect(parser.marc_spec).to parse('...${{245$a}', trace: true, reporter: reporter)
2943
+ end
2944
+
2945
+ it '&& mix one lowercase char and two digits -> valid' do
2946
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2947
+ expect(parser.marc_spec).to parse('...${{$a|$b|$c}', trace: true, reporter: reporter)
2948
+ end
2949
+
2950
+ it '&& mix two lowercase chars and one digit -> valid' do
2951
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2952
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\$}', trace: true, reporter: reporter)
2953
+ end
2954
+
2955
+ it '&& one digit two wildcards right -> valid' do
2956
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2957
+ expect(parser.marc_spec).to parse('...${{$a!=$b}', trace: true, reporter: reporter)
2958
+ end
2959
+
2960
+ it '&& one lowercase and two wildcards right -> valid' do
2961
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2962
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\=}', trace: true, reporter: reporter)
2963
+ end
2964
+
2965
+ it '&& one uppercase char two wildcards right -> valid' do
2966
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2967
+ expect(parser.marc_spec).to parse('...${{$a|$b}{$c|$d}', trace: true, reporter: reporter)
2968
+ end
2969
+
2970
+ it '&& one wildcard between uppercase chars -> valid' do
2971
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2972
+ expect(parser.marc_spec).to parse('...${{$a}{$b|$c}', trace: true, reporter: reporter)
2973
+ end
2974
+
2975
+ it '&& one wildcard left and two lowercase chars -> valid' do
2976
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2977
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\!}', trace: true, reporter: reporter)
2978
+ end
2979
+
2980
+ it '&& one wildcard left two uppercase chars -> valid' do
2981
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2982
+ expect(parser.marc_spec).to parse('...${{$a|$b}{$c}', trace: true, reporter: reporter)
2983
+ end
2984
+
2985
+ it '&& one wildcard left with two digits -> valid' do
2986
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2987
+ expect(parser.marc_spec).to parse('...${{?$a}', trace: true, reporter: reporter)
2988
+ end
2989
+
2990
+ it '&& two digits wildcard right -> valid' do
2991
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2992
+ expect(parser.marc_spec).to parse('...${{$a=$b}', trace: true, reporter: reporter)
2993
+ end
2994
+
2995
+ it '&& two wildcards and one lowercase char right -> valid' do
2996
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
2997
+ expect(parser.marc_spec).to parse('...${{$a~\\test\\}}', trace: true, reporter: reporter)
2998
+ end
2999
+
3000
+ it '&& two wildcards left one uppercase char -> valid' do
3001
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3002
+ expect(parser.marc_spec).to parse('...${{/#=\\/}', trace: true, reporter: reporter)
3003
+ end
3004
+
3005
+ it '&& two wildcards left with digit -> valid' do
3006
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3007
+ expect(parser.marc_spec).to parse('...${{$a}', trace: true, reporter: reporter)
3008
+ end
3009
+
3010
+ it '&& wildcard between digits -> valid' do
3011
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3012
+ expect(parser.marc_spec).to parse('...${{!$a}', trace: true, reporter: reporter)
3013
+ end
3014
+
3015
+ end
3016
+
3017
+ describe 'subfieldtag }' do
3018
+
3019
+ it '&& all digits -> valid' do
3020
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3021
+ expect(parser.marc_spec).to parse('...$}{$a~\\Poe}', trace: true, reporter: reporter)
3022
+ end
3023
+
3024
+ it '&& all lowercase chars -> valid' do
3025
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3026
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\{}', trace: true, reporter: reporter)
3027
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\~}', trace: true, reporter: reporter)
3028
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\?}', trace: true, reporter: reporter)
3029
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\|}', trace: true, reporter: reporter)
3030
+ end
3031
+
3032
+ it '&& all uppercase chars special leader -> valid' do
3033
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3034
+ expect(parser.marc_spec).to parse('...$}{$a!~\\Poe}', trace: true, reporter: reporter)
3035
+ end
3036
+
3037
+ it '&& all wildcards -> valid' do
3038
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3039
+ expect(parser.marc_spec).to parse('...$}{245$a}', trace: true, reporter: reporter)
3040
+ end
3041
+
3042
+ it '&& mix one lowercase char and two digits -> valid' do
3043
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3044
+ expect(parser.marc_spec).to parse('...$}{$a|$b|$c}', trace: true, reporter: reporter)
3045
+ end
3046
+
3047
+ it '&& mix two lowercase chars and one digit -> valid' do
3048
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3049
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\$}', trace: true, reporter: reporter)
3050
+ end
3051
+
3052
+ it '&& one digit two wildcards right -> valid' do
3053
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3054
+ expect(parser.marc_spec).to parse('...$}{$a!=$b}', trace: true, reporter: reporter)
3055
+ end
3056
+
3057
+ it '&& one lowercase and two wildcards right -> valid' do
3058
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3059
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\=}', trace: true, reporter: reporter)
3060
+ end
3061
+
3062
+ it '&& one uppercase char two wildcards right -> valid' do
3063
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3064
+ expect(parser.marc_spec).to parse('...$}{$a|$b}{$c|$d}', trace: true, reporter: reporter)
3065
+ end
3066
+
3067
+ it '&& one wildcard between uppercase chars -> valid' do
3068
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3069
+ expect(parser.marc_spec).to parse('...$}{$a}{$b|$c}', trace: true, reporter: reporter)
3070
+ end
3071
+
3072
+ it '&& one wildcard left and two lowercase chars -> valid' do
3073
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3074
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\!}', trace: true, reporter: reporter)
3075
+ end
3076
+
3077
+ it '&& one wildcard left two uppercase chars -> valid' do
3078
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3079
+ expect(parser.marc_spec).to parse('...$}{$a|$b}{$c}', trace: true, reporter: reporter)
3080
+ end
3081
+
3082
+ it '&& one wildcard left with two digits -> valid' do
3083
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3084
+ expect(parser.marc_spec).to parse('...$}{?$a}', trace: true, reporter: reporter)
3085
+ end
3086
+
3087
+ it '&& two digits wildcard right -> valid' do
3088
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3089
+ expect(parser.marc_spec).to parse('...$}{$a=$b}', trace: true, reporter: reporter)
3090
+ end
3091
+
3092
+ it '&& two wildcards and one lowercase char right -> valid' do
3093
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3094
+ expect(parser.marc_spec).to parse('...$}{$a~\\test\\}}', trace: true, reporter: reporter)
3095
+ end
3096
+
3097
+ it '&& two wildcards left one uppercase char -> valid' do
3098
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3099
+ expect(parser.marc_spec).to parse('...$}{/#=\\/}', trace: true, reporter: reporter)
3100
+ end
3101
+
3102
+ it '&& two wildcards left with digit -> valid' do
3103
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3104
+ expect(parser.marc_spec).to parse('...$}{$a}', trace: true, reporter: reporter)
3105
+ end
3106
+
3107
+ it '&& wildcard between digits -> valid' do
3108
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3109
+ expect(parser.marc_spec).to parse('...$}{!$a}', trace: true, reporter: reporter)
3110
+ end
3111
+
3112
+ end
3113
+
3114
+ describe 'subfieldtag ~' do
3115
+
3116
+ it '&& all digits -> valid' do
3117
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3118
+ expect(parser.marc_spec).to parse('...$~{$a~\\Poe}', trace: true, reporter: reporter)
3119
+ end
3120
+
3121
+ it '&& all lowercase chars -> valid' do
3122
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3123
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\{}', trace: true, reporter: reporter)
3124
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\~}', trace: true, reporter: reporter)
3125
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\?}', trace: true, reporter: reporter)
3126
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\|}', trace: true, reporter: reporter)
3127
+ end
3128
+
3129
+ it '&& all uppercase chars special leader -> valid' do
3130
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3131
+ expect(parser.marc_spec).to parse('...$~{$a!~\\Poe}', trace: true, reporter: reporter)
3132
+ end
3133
+
3134
+ it '&& all wildcards -> valid' do
3135
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3136
+ expect(parser.marc_spec).to parse('...$~{245$a}', trace: true, reporter: reporter)
3137
+ end
3138
+
3139
+ it '&& mix one lowercase char and two digits -> valid' do
3140
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3141
+ expect(parser.marc_spec).to parse('...$~{$a|$b|$c}', trace: true, reporter: reporter)
3142
+ end
3143
+
3144
+ it '&& mix two lowercase chars and one digit -> valid' do
3145
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3146
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\$}', trace: true, reporter: reporter)
3147
+ end
3148
+
3149
+ it '&& one digit two wildcards right -> valid' do
3150
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3151
+ expect(parser.marc_spec).to parse('...$~{$a!=$b}', trace: true, reporter: reporter)
3152
+ end
3153
+
3154
+ it '&& one lowercase and two wildcards right -> valid' do
3155
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3156
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\=}', trace: true, reporter: reporter)
3157
+ end
3158
+
3159
+ it '&& one uppercase char two wildcards right -> valid' do
3160
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3161
+ expect(parser.marc_spec).to parse('...$~{$a|$b}{$c|$d}', trace: true, reporter: reporter)
3162
+ end
3163
+
3164
+ it '&& one wildcard between uppercase chars -> valid' do
3165
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3166
+ expect(parser.marc_spec).to parse('...$~{$a}{$b|$c}', trace: true, reporter: reporter)
3167
+ end
3168
+
3169
+ it '&& one wildcard left and two lowercase chars -> valid' do
3170
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3171
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\!}', trace: true, reporter: reporter)
3172
+ end
3173
+
3174
+ it '&& one wildcard left two uppercase chars -> valid' do
3175
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3176
+ expect(parser.marc_spec).to parse('...$~{$a|$b}{$c}', trace: true, reporter: reporter)
3177
+ end
3178
+
3179
+ it '&& one wildcard left with two digits -> valid' do
3180
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3181
+ expect(parser.marc_spec).to parse('...$~{?$a}', trace: true, reporter: reporter)
3182
+ end
3183
+
3184
+ it '&& two digits wildcard right -> valid' do
3185
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3186
+ expect(parser.marc_spec).to parse('...$~{$a=$b}', trace: true, reporter: reporter)
3187
+ end
3188
+
3189
+ it '&& two wildcards and one lowercase char right -> valid' do
3190
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3191
+ expect(parser.marc_spec).to parse('...$~{$a~\\test\\}}', trace: true, reporter: reporter)
3192
+ end
3193
+
3194
+ it '&& two wildcards left one uppercase char -> valid' do
3195
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3196
+ expect(parser.marc_spec).to parse('...$~{/#=\\/}', trace: true, reporter: reporter)
3197
+ end
3198
+
3199
+ it '&& two wildcards left with digit -> valid' do
3200
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3201
+ expect(parser.marc_spec).to parse('...$~{$a}', trace: true, reporter: reporter)
3202
+ end
3203
+
3204
+ it '&& wildcard between digits -> valid' do
3205
+ # /valid/wildCombination_validSubfieldTagSubSpec.json
3206
+ expect(parser.marc_spec).to parse('...$~{!$a}', trace: true, reporter: reporter)
3207
+ end
3208
+
3209
+ end
3210
+
3211
+ end
3212
+ end
3213
+ end
3214
+ end
3215
+ end
3216
+ end