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,477 @@
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_range do
9
+ let(:parser) { Parser.new }
10
+ let(:reporter) { Parslet::ErrorReporter::Deepest.new }
11
+
12
+ describe 'marc_spec: valid field tag, subfield tag and subfield range' do
13
+ # /valid/wildCombination_validSubfieldTagRange.json
14
+ it 'subfieldtag & && subfield range with digits -> valid' do
15
+ # /valid/wildCombination_validSubfieldTagRange.json
16
+ expect(parser.marc_spec).to parse('...$&$0-9', trace: true, reporter: reporter)
17
+ end
18
+
19
+ it 'subfieldtag & && subfield range with lowercase subfieldtags -> valid' do
20
+ # /valid/wildCombination_validSubfieldTagRange.json
21
+ expect(parser.marc_spec).to parse('...$&$a-z', trace: true, reporter: reporter)
22
+ end
23
+
24
+ describe 'lowercase alpha subfieldtag a' do
25
+
26
+ it '&& subfield range with digits -> valid' do
27
+ # /valid/wildCombination_validSubfieldTagRange.json
28
+ expect(parser.marc_spec).to parse('...$a$0-9', trace: true, reporter: reporter)
29
+ end
30
+
31
+ it '&& subfield range with lowercase subfieldtags -> valid' do
32
+ # /valid/wildCombination_validSubfieldTagRange.json
33
+ expect(parser.marc_spec).to parse('...$a$a-z', trace: true, reporter: reporter)
34
+ end
35
+
36
+ end
37
+
38
+ describe 'lowercase alpha subfieldtag z' do
39
+
40
+ it '&& subfield range with digits -> valid' do
41
+ # /valid/wildCombination_validSubfieldTagRange.json
42
+ expect(parser.marc_spec).to parse('...$z$0-9', trace: true, reporter: reporter)
43
+ end
44
+
45
+ it '&& subfield range with lowercase subfieldtags -> valid' do
46
+ # /valid/wildCombination_validSubfieldTagRange.json
47
+ expect(parser.marc_spec).to parse('...$z$a-z', trace: true, reporter: reporter)
48
+ end
49
+
50
+ end
51
+
52
+ describe 'digit subfieldtag 0' do
53
+
54
+ it '&& subfield range with digits -> valid' do
55
+ # /valid/wildCombination_validSubfieldTagRange.json
56
+ expect(parser.marc_spec).to parse('...$0$0-9', trace: true, reporter: reporter)
57
+ end
58
+
59
+ it '&& subfield range with lowercase subfieldtags -> valid' do
60
+ # /valid/wildCombination_validSubfieldTagRange.json
61
+ expect(parser.marc_spec).to parse('...$0$a-z', trace: true, reporter: reporter)
62
+ end
63
+
64
+ end
65
+
66
+ describe 'digit subfieldtag 9' do
67
+
68
+ it '&& subfield range with digits -> valid' do
69
+ # /valid/wildCombination_validSubfieldTagRange.json
70
+ expect(parser.marc_spec).to parse('...$9$0-9', trace: true, reporter: reporter)
71
+ end
72
+
73
+ it '&& subfield range with lowercase subfieldtags -> valid' do
74
+ # /valid/wildCombination_validSubfieldTagRange.json
75
+ expect(parser.marc_spec).to parse('...$9$a-z', trace: true, reporter: reporter)
76
+ end
77
+
78
+ end
79
+
80
+ describe 'subfieldtag !' do
81
+
82
+ it '&& subfield range with digits -> valid' do
83
+ # /valid/wildCombination_validSubfieldTagRange.json
84
+ expect(parser.marc_spec).to parse('...$!$0-9', trace: true, reporter: reporter)
85
+ end
86
+
87
+ it '&& subfield range with lowercase subfieldtags -> valid' do
88
+ # /valid/wildCombination_validSubfieldTagRange.json
89
+ expect(parser.marc_spec).to parse('...$!$a-z', trace: true, reporter: reporter)
90
+ end
91
+
92
+ end
93
+
94
+ describe 'subfieldtag #' do
95
+
96
+ it '&& subfield range with digits -> valid' do
97
+ # /valid/wildCombination_validSubfieldTagRange.json
98
+ expect(parser.marc_spec).to parse("...$\#$0-9", trace: true, reporter: reporter)
99
+ end
100
+
101
+ it '&& subfield range with lowercase subfieldtags -> valid' do
102
+ # /valid/wildCombination_validSubfieldTagRange.json
103
+ expect(parser.marc_spec).to parse("...$\#$a-z", trace: true, reporter: reporter)
104
+ end
105
+
106
+ end
107
+
108
+ describe 'subfieldtag $' do
109
+
110
+ it '&& subfield range with digits -> valid' do
111
+ # /valid/wildCombination_validSubfieldTagRange.json
112
+ expect(parser.marc_spec).to parse('...$$$0-9', trace: true, reporter: reporter)
113
+ end
114
+
115
+ it '&& subfield range with lowercase subfieldtags -> valid' do
116
+ # /valid/wildCombination_validSubfieldTagRange.json
117
+ expect(parser.marc_spec).to parse('...$$$a-z', trace: true, reporter: reporter)
118
+ end
119
+
120
+ end
121
+
122
+ describe 'subfieldtag %' do
123
+
124
+ it '&& subfield range with digits -> valid' do
125
+ # /valid/wildCombination_validSubfieldTagRange.json
126
+ expect(parser.marc_spec).to parse('...$%$0-9', trace: true, reporter: reporter)
127
+ end
128
+
129
+ it '&& subfield range with lowercase subfieldtags -> valid' do
130
+ # /valid/wildCombination_validSubfieldTagRange.json
131
+ expect(parser.marc_spec).to parse('...$%$a-z', trace: true, reporter: reporter)
132
+ end
133
+
134
+ end
135
+
136
+ describe "subfieldtag '" do
137
+
138
+ it '&& subfield range with digits -> valid' do
139
+ # /valid/wildCombination_validSubfieldTagRange.json
140
+ expect(parser.marc_spec).to parse("...$'$0-9", trace: true, reporter: reporter)
141
+ end
142
+
143
+ it '&& subfield range with lowercase subfieldtags -> valid' do
144
+ # /valid/wildCombination_validSubfieldTagRange.json
145
+ expect(parser.marc_spec).to parse("...$'$a-z", trace: true, reporter: reporter)
146
+ end
147
+
148
+ end
149
+
150
+ describe 'subfieldtag (' do
151
+
152
+ it '&& subfield range with digits -> valid' do
153
+ # /valid/wildCombination_validSubfieldTagRange.json
154
+ expect(parser.marc_spec).to parse('...$($0-9', trace: true, reporter: reporter)
155
+ end
156
+
157
+ it '&& subfield range with lowercase subfieldtags -> valid' do
158
+ # /valid/wildCombination_validSubfieldTagRange.json
159
+ expect(parser.marc_spec).to parse('...$($a-z', trace: true, reporter: reporter)
160
+ end
161
+
162
+ end
163
+
164
+ describe 'subfieldtag )' do
165
+
166
+ it '&& subfield range with digits -> valid' do
167
+ # /valid/wildCombination_validSubfieldTagRange.json
168
+ expect(parser.marc_spec).to parse('...$)$0-9', trace: true, reporter: reporter)
169
+ end
170
+
171
+ it '&& subfield range with lowercase subfieldtags -> valid' do
172
+ # /valid/wildCombination_validSubfieldTagRange.json
173
+ expect(parser.marc_spec).to parse('...$)$a-z', trace: true, reporter: reporter)
174
+ end
175
+
176
+ end
177
+
178
+ describe 'subfieldtag *' do
179
+
180
+ it '&& subfield range with digits -> valid' do
181
+ # /valid/wildCombination_validSubfieldTagRange.json
182
+ expect(parser.marc_spec).to parse('...$*$0-9', trace: true, reporter: reporter)
183
+ end
184
+
185
+ it '&& subfield range with lowercase subfieldtags -> valid' do
186
+ # /valid/wildCombination_validSubfieldTagRange.json
187
+ expect(parser.marc_spec).to parse('...$*$a-z', trace: true, reporter: reporter)
188
+ end
189
+
190
+ end
191
+
192
+ describe 'subfieldtag +' do
193
+
194
+ it '&& subfield range with digits -> valid' do
195
+ # /valid/wildCombination_validSubfieldTagRange.json
196
+ expect(parser.marc_spec).to parse('...$+$0-9', trace: true, reporter: reporter)
197
+ end
198
+
199
+ it '&& subfield range with lowercase subfieldtags -> valid' do
200
+ # /valid/wildCombination_validSubfieldTagRange.json
201
+ expect(parser.marc_spec).to parse('...$+$a-z', trace: true, reporter: reporter)
202
+ end
203
+
204
+ end
205
+
206
+ describe 'subfieldtag ,' do
207
+
208
+ it '&& subfield range with digits -> valid' do
209
+ # /valid/wildCombination_validSubfieldTagRange.json
210
+ expect(parser.marc_spec).to parse('...$,$0-9', trace: true, reporter: reporter)
211
+ end
212
+
213
+ it '&& subfield range with lowercase subfieldtags -> valid' do
214
+ # /valid/wildCombination_validSubfieldTagRange.json
215
+ expect(parser.marc_spec).to parse('...$,$a-z', trace: true, reporter: reporter)
216
+ end
217
+
218
+ end
219
+
220
+ describe 'subfieldtag -' do
221
+
222
+ it '&& subfield range with digits -> valid' do
223
+ # /valid/wildCombination_validSubfieldTagRange.json
224
+ expect(parser.marc_spec).to parse('...$-$0-9', trace: true, reporter: reporter)
225
+ end
226
+
227
+ it '&& subfield range with lowercase subfieldtags -> valid' do
228
+ # /valid/wildCombination_validSubfieldTagRange.json
229
+ expect(parser.marc_spec).to parse('...$-$a-z', trace: true, reporter: reporter)
230
+ end
231
+
232
+ end
233
+
234
+ describe 'subfieldtag .' do
235
+
236
+ it '&& subfield range with digits -> valid' do
237
+ # /valid/wildCombination_validSubfieldTagRange.json
238
+ expect(parser.marc_spec).to parse('...$.$0-9', trace: true, reporter: reporter)
239
+ end
240
+
241
+ it '&& subfield range with lowercase subfieldtags -> valid' do
242
+ # /valid/wildCombination_validSubfieldTagRange.json
243
+ expect(parser.marc_spec).to parse('...$.$a-z', trace: true, reporter: reporter)
244
+ end
245
+
246
+ end
247
+
248
+ describe 'subfieldtag /' do
249
+
250
+ it '&& subfield range with digits -> valid' do
251
+ # /valid/wildCombination_validSubfieldTagRange.json
252
+ expect(parser.marc_spec).to parse('...$/$0-9', trace: true, reporter: reporter)
253
+ end
254
+
255
+ it '&& subfield range with lowercase subfieldtags -> valid' do
256
+ # /valid/wildCombination_validSubfieldTagRange.json
257
+ expect(parser.marc_spec).to parse('...$/$a-z', trace: true, reporter: reporter)
258
+ end
259
+
260
+ end
261
+
262
+ describe 'subfieldtag :' do
263
+
264
+ it '&& subfield range with digits -> valid' do
265
+ # /valid/wildCombination_validSubfieldTagRange.json
266
+ expect(parser.marc_spec).to parse('...$:$0-9', trace: true, reporter: reporter)
267
+ end
268
+
269
+ it '&& subfield range with lowercase subfieldtags -> valid' do
270
+ # /valid/wildCombination_validSubfieldTagRange.json
271
+ expect(parser.marc_spec).to parse('...$:$a-z', trace: true, reporter: reporter)
272
+ end
273
+
274
+ end
275
+
276
+ describe 'subfieldtag ;' do
277
+
278
+ it '&& subfield range with digits -> valid' do
279
+ # /valid/wildCombination_validSubfieldTagRange.json
280
+ expect(parser.marc_spec).to parse('...$;$0-9', trace: true, reporter: reporter)
281
+ end
282
+
283
+ it '&& subfield range with lowercase subfieldtags -> valid' do
284
+ # /valid/wildCombination_validSubfieldTagRange.json
285
+ expect(parser.marc_spec).to parse('...$;$a-z', trace: true, reporter: reporter)
286
+ end
287
+
288
+ end
289
+
290
+ describe 'subfieldtag <' do
291
+
292
+ it '&& subfield range with digits -> valid' do
293
+ # /valid/wildCombination_validSubfieldTagRange.json
294
+ expect(parser.marc_spec).to parse('...$<$0-9', trace: true, reporter: reporter)
295
+ end
296
+
297
+ it '&& subfield range with lowercase subfieldtags -> valid' do
298
+ # /valid/wildCombination_validSubfieldTagRange.json
299
+ expect(parser.marc_spec).to parse('...$<$a-z', trace: true, reporter: reporter)
300
+ end
301
+
302
+ end
303
+
304
+ describe 'subfieldtag =' do
305
+
306
+ it '&& subfield range with digits -> valid' do
307
+ # /valid/wildCombination_validSubfieldTagRange.json
308
+ expect(parser.marc_spec).to parse('...$=$0-9', trace: true, reporter: reporter)
309
+ end
310
+
311
+ it '&& subfield range with lowercase subfieldtags -> valid' do
312
+ # /valid/wildCombination_validSubfieldTagRange.json
313
+ expect(parser.marc_spec).to parse('...$=$a-z', trace: true, reporter: reporter)
314
+ end
315
+
316
+ end
317
+
318
+ describe 'subfieldtag >' do
319
+
320
+ it '&& subfield range with digits -> valid' do
321
+ # /valid/wildCombination_validSubfieldTagRange.json
322
+ expect(parser.marc_spec).to parse('...$>$0-9', trace: true, reporter: reporter)
323
+ end
324
+
325
+ it '&& subfield range with lowercase subfieldtags -> valid' do
326
+ # /valid/wildCombination_validSubfieldTagRange.json
327
+ expect(parser.marc_spec).to parse('...$>$a-z', trace: true, reporter: reporter)
328
+ end
329
+
330
+ end
331
+
332
+ describe 'subfieldtag ?' do
333
+
334
+ it '&& subfield range with digits -> valid' do
335
+ # /valid/wildCombination_validSubfieldTagRange.json
336
+ expect(parser.marc_spec).to parse('...$?$0-9', trace: true, reporter: reporter)
337
+ end
338
+
339
+ it '&& subfield range with lowercase subfieldtags -> valid' do
340
+ # /valid/wildCombination_validSubfieldTagRange.json
341
+ expect(parser.marc_spec).to parse('...$?$a-z', trace: true, reporter: reporter)
342
+ end
343
+
344
+ end
345
+
346
+ describe 'subfieldtag [' do
347
+
348
+ it '&& subfield range with digits -> valid' do
349
+ # /valid/wildCombination_validSubfieldTagRange.json
350
+ expect(parser.marc_spec).to parse('...$[$0-9', trace: true, reporter: reporter)
351
+ end
352
+
353
+ it '&& subfield range with lowercase subfieldtags -> valid' do
354
+ # /valid/wildCombination_validSubfieldTagRange.json
355
+ expect(parser.marc_spec).to parse('...$[$a-z', trace: true, reporter: reporter)
356
+ end
357
+
358
+ end
359
+
360
+ describe 'subfieldtag \\' do
361
+
362
+ it '&& subfield range with digits -> valid' do
363
+ # /valid/wildCombination_validSubfieldTagRange.json
364
+ expect(parser.marc_spec).to parse('...$\\$0-9', trace: true, reporter: reporter)
365
+ end
366
+
367
+ it '&& subfield range with lowercase subfieldtags -> valid' do
368
+ # /valid/wildCombination_validSubfieldTagRange.json
369
+ expect(parser.marc_spec).to parse('...$\\$a-z', trace: true, reporter: reporter)
370
+ end
371
+
372
+ end
373
+
374
+ describe 'subfieldtag ]' do
375
+
376
+ it '&& subfield range with digits -> valid' do
377
+ # /valid/wildCombination_validSubfieldTagRange.json
378
+ expect(parser.marc_spec).to parse('...$]$0-9', trace: true, reporter: reporter)
379
+ end
380
+
381
+ it '&& subfield range with lowercase subfieldtags -> valid' do
382
+ # /valid/wildCombination_validSubfieldTagRange.json
383
+ expect(parser.marc_spec).to parse('...$]$a-z', trace: true, reporter: reporter)
384
+ end
385
+
386
+ end
387
+
388
+ describe 'subfieldtag ^' do
389
+
390
+ it '&& subfield range with digits -> valid' do
391
+ # /valid/wildCombination_validSubfieldTagRange.json
392
+ expect(parser.marc_spec).to parse('...$^$0-9', trace: true, reporter: reporter)
393
+ end
394
+
395
+ it '&& subfield range with lowercase subfieldtags -> valid' do
396
+ # /valid/wildCombination_validSubfieldTagRange.json
397
+ expect(parser.marc_spec).to parse('...$^$a-z', trace: true, reporter: reporter)
398
+ end
399
+
400
+ end
401
+
402
+ describe 'subfieldtag _' do
403
+
404
+ it '&& subfield range with digits -> valid' do
405
+ # /valid/wildCombination_validSubfieldTagRange.json
406
+ expect(parser.marc_spec).to parse('...$_$0-9', trace: true, reporter: reporter)
407
+ end
408
+
409
+ it '&& subfield range with lowercase subfieldtags -> valid' do
410
+ # /valid/wildCombination_validSubfieldTagRange.json
411
+ expect(parser.marc_spec).to parse('...$_$a-z', trace: true, reporter: reporter)
412
+ end
413
+
414
+ end
415
+
416
+ describe 'subfieldtag `' do
417
+
418
+ it '&& subfield range with digits -> valid' do
419
+ # /valid/wildCombination_validSubfieldTagRange.json
420
+ expect(parser.marc_spec).to parse('...$`$0-9', trace: true, reporter: reporter)
421
+ end
422
+
423
+ it '&& subfield range with lowercase subfieldtags -> valid' do
424
+ # /valid/wildCombination_validSubfieldTagRange.json
425
+ expect(parser.marc_spec).to parse('...$`$a-z', trace: true, reporter: reporter)
426
+ end
427
+
428
+ end
429
+
430
+ describe 'subfieldtag {' do
431
+
432
+ it '&& subfield range with digits -> valid' do
433
+ # /valid/wildCombination_validSubfieldTagRange.json
434
+ expect(parser.marc_spec).to parse('...${$0-9', trace: true, reporter: reporter)
435
+ end
436
+
437
+ it '&& subfield range with lowercase subfieldtags -> valid' do
438
+ # /valid/wildCombination_validSubfieldTagRange.json
439
+ expect(parser.marc_spec).to parse('...${$a-z', trace: true, reporter: reporter)
440
+ end
441
+
442
+ end
443
+
444
+ describe 'subfieldtag }' do
445
+
446
+ it '&& subfield range with digits -> valid' do
447
+ # /valid/wildCombination_validSubfieldTagRange.json
448
+ expect(parser.marc_spec).to parse('...$}$0-9', trace: true, reporter: reporter)
449
+ end
450
+
451
+ it '&& subfield range with lowercase subfieldtags -> valid' do
452
+ # /valid/wildCombination_validSubfieldTagRange.json
453
+ expect(parser.marc_spec).to parse('...$}$a-z', trace: true, reporter: reporter)
454
+ end
455
+
456
+ end
457
+
458
+ describe 'subfieldtag ~' do
459
+
460
+ it '&& subfield range with digits -> valid' do
461
+ # /valid/wildCombination_validSubfieldTagRange.json
462
+ expect(parser.marc_spec).to parse('...$~$0-9', trace: true, reporter: reporter)
463
+ end
464
+
465
+ it '&& subfield range with lowercase subfieldtags -> valid' do
466
+ # /valid/wildCombination_validSubfieldTagRange.json
467
+ expect(parser.marc_spec).to parse('...$~$a-z', trace: true, reporter: reporter)
468
+ end
469
+
470
+ end
471
+
472
+ end
473
+ end
474
+ end
475
+ end
476
+ end
477
+ end