summary refs log tree commit diff
path: root/Test/54compmatch.ztst
blob: 6d0452380af7ce8ec6a08af92756e896e4752ab4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# Tests for completion system matching control

# Most tests follow this format:
#	test_code $matcher_string selection_list
#	comptest -c "$code" $' tst input_string'
# test_code generates the string $codem which sets what words the completion
# should be selecting from.  The comptest function actually performs the
# completion test, using the completion function generated by test_code.
#
# This test also tests error conditions that compadd reports, so output also
# contains the compadd output.

%prep
  . $ZTST_srcdir/comptest

  mkdir match.tmp
  cd match.tmp

  comptestinit -z $ZTST_testdir/../Src/zsh

  list1=(IndianRed IndianRed2 IndianRed3 IndianRed4)
  test_code () {
	matcher=$1;
	list=$2;
	code="compdef _tst tst ; _tst () { echo -n '<COMPADD>';compadd -M '"
	code="$code$matcher"
	code="$code'  - ${(P)list} ; echo  -n '</COMPADD>'"
        code="$code; $extra_cmd"
        code="$code; echo -n '<INSERT_POSITIONS>'"
        code="$code; echo \$compstate[insert_positions]"
        code="$code; echo -n '</INSERT_POSITIONS>'"
        code="$code}"
	comptesteval "$code"
  }



	 

%test

 test_code z: list1
 comptest  $'tst \t'
0:Match Error for "z:"
>line: {tst }{}
>COMPADD:{_tst:compadd: unknown match specification character `z'}
>INSERT_POSITIONS:{}

 test_code m: list1
 comptest  $'tst \t'
0:Match Error for "m:"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing patterns}
>INSERT_POSITIONS:{}

 test_code M: list1
 comptest $'tst \t'
0:Match Error for "M:"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing patterns}
>INSERT_POSITIONS:{}

 test_code r: list1
 comptest $'tst \t'
0:Match Error "r:"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing patterns}
>INSERT_POSITIONS:{}

 test_code R: list1
 comptest $'tst \t'
0:Match Error "R:"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing patterns}
>INSERT_POSITIONS:{}

 test_code l: list1
 comptest $'tst \t'
0:Match Error for "l:"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing patterns}
>INSERT_POSITIONS:{}

 test_code L: list1
 comptest $'tst \t'
0:Match Error for "L:"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing patterns}
>INSERT_POSITIONS:{}

 test_code 'm:{0-9' list1
 comptest $'tst \t'
0:Match Error for "m:{0-9"
>line: {tst }{}
>COMPADD:{_tst:compadd: unterminated character class}
>INSERT_POSITIONS:{}

 test_code 'm:{0-9}' list1
 comptest $'tst \t'
0:Match Error for "m:{0-9}"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing word pattern}
>INSERT_POSITIONS:{}

 test_code 'm:{0-9}={' list1
 comptest $'tst \t'
0:Match Error for "m:{0-9}={"
>line: {tst }{}
>COMPADD:{_tst:compadd: unterminated character class}
>INSERT_POSITIONS:{}

 test_code 'm:{0-9}={0-' list1
 comptest $'tst \t'
0:Match Error for "m:{0-9}={0-"
>line: {tst }{}
>COMPADD:{_tst:compadd: unterminated character class}
>INSERT_POSITIONS:{}

 test_code 'm:{0-9}={-' list1
 comptest $'tst \t'
0:Match Error for "m:{0-9}={-"
>line: {tst }{}
>COMPADD:{_tst:compadd: unterminated character class}
>INSERT_POSITIONS:{}

 test_code r: list1
 comptest $'tst \t'
0:Match Error "r:"
>line: {tst }{}
>COMPADD:{_tst:compadd: missing patterns}
>INSERT_POSITIONS:{}

  example1_list=(
	kshoptionprint        shglob              
	listambiguous         shinstdin           
	listbeep              shnullcmd           
	listpacked            shoptionletters     
	listrowsfirst         shortloops          
	listtypes             shwordsplit
   )
 options_matcher='L:|[nN][oO]= M:_= M:{A-Z}={a-z}'
 test_code $options_matcher example1_list
 comptest $'tst nolistbee\t'
0:Documentation example for options, input "nolistbee"
>line: {tst nolistbeep }{}
>COMPADD:{}
>INSERT_POSITIONS:{14}


 test_code $options_matcher example1_list
 comptest $'tst list_bee\t'
0:Documentation example for options, input "list_bee"
>line: {tst list_beep }{}
>COMPADD:{}
>INSERT_POSITIONS:{13}

 test_code $options_matcher example1_list
 comptest $'tst ListBee\t'
0:Documentation example for options, input "ListBee"
>line: {tst ListBeep }{}
>COMPADD:{}
>INSERT_POSITIONS:{12}

 test_code $options_matcher example1_list
 comptest $'tst NOList\tB\t'
0:Documentation example for options, input "NOList"
>line: {tst NOList}{}
>COMPADD:{}
>INSERT_POSITIONS:{10}
>NO:{NOListambiguous}
>NO:{NOListbeep}
>NO:{NOListpacked}
>NO:{NOListrowsfirst}
>NO:{NOListtypes}
>line: {tst NOListBeep }{}
>COMPADD:{}
>INSERT_POSITIONS:{14}


 test_code $options_matcher example1_list
 comptest $'tst NO_List\t__\tB\t'
0:Documentation example for options, input "NO_List\t__\tB\t"
>line: {tst NO_List}{}
>COMPADD:{}
>INSERT_POSITIONS:{11}
>NO:{NO_Listambiguous}
>NO:{NO_Listbeep}
>NO:{NO_Listpacked}
>NO:{NO_Listrowsfirst}
>NO:{NO_Listtypes}
>line: {tst NO_List__}{}
>COMPADD:{}
>INSERT_POSITIONS:{13}
>NO:{NO_List__ambiguous}
>NO:{NO_List__beep}
>NO:{NO_List__packed}
>NO:{NO_List__rowsfirst}
>NO:{NO_List__types}
>line: {tst NO_List__Beep }{}
>COMPADD:{}
>INSERT_POSITIONS:{17}

 test_code $options_matcher example1_list
 comptest $'tst __\tN\t__o\t___\tlist_\tbeep__\t'
0:Documentation example for options, input "__\tN\t__o\t___\tlist_\tbeep__\t" 
>line: {tst __}{}
>COMPADD:{}
>INSERT_POSITIONS:{6}
>NO:{__kshoptionprint}
>NO:{__listambiguous}
>NO:{__listbeep}
>NO:{__listpacked}
>NO:{__listrowsfirst}
>NO:{__listtypes}
>NO:{__shglob}
>NO:{__shinstdin}
>NO:{__shnullcmd}
>NO:{__shoptionletters}
>NO:{__shortloops}
>NO:{__shwordsplit}
>line: {tst __N}{}
>COMPADD:{}
>INSERT_POSITIONS:{}
>line: {tst __N__o}{}
>COMPADD:{}
>INSERT_POSITIONS:{}
>line: {tst __N__o___}{}
>COMPADD:{}
>INSERT_POSITIONS:{}
>line: {tst __N__o___list_}{}
>COMPADD:{}
>INSERT_POSITIONS:{}
>line: {tst __N__o___list_beep__}{}
>COMPADD:{}
>INSERT_POSITIONS:{}

 test_code $options_matcher example1_list
 comptest $'tst __\tNo\t___\tlist_\tbeep__\t'
0:Documentation example for options, input "__\tNo\t___\tlist_\tbeep__\t" 
>line: {tst __}{}
>COMPADD:{}
>INSERT_POSITIONS:{6}
>NO:{__kshoptionprint}
>NO:{__listambiguous}
>NO:{__listbeep}
>NO:{__listpacked}
>NO:{__listrowsfirst}
>NO:{__listtypes}
>NO:{__shglob}
>NO:{__shinstdin}
>NO:{__shnullcmd}
>NO:{__shoptionletters}
>NO:{__shortloops}
>NO:{__shwordsplit}
>line: {tst __No}{}
>COMPADD:{}
>INSERT_POSITIONS:{}
>line: {tst __No___}{}
>COMPADD:{}
>INSERT_POSITIONS:{}
>line: {tst __No___list_}{}
>COMPADD:{}
>INSERT_POSITIONS:{}
>line: {tst __No___list_beep__}{}
>COMPADD:{}
>INSERT_POSITIONS:{}


 test_code $options_matcher example1_list
 comptest $'tst ___\tlist_\tbeep__\t'
0:Documentation example for options, input "___\tlist_\tbeep__\t" 
>line: {tst ___}{}
>COMPADD:{}
>INSERT_POSITIONS:{7}
>NO:{___kshoptionprint}
>NO:{___listambiguous}
>NO:{___listbeep}
>NO:{___listpacked}
>NO:{___listrowsfirst}
>NO:{___listtypes}
>NO:{___shglob}
>NO:{___shinstdin}
>NO:{___shnullcmd}
>NO:{___shoptionletters}
>NO:{___shortloops}
>NO:{___shwordsplit}
>line: {tst ___list_}{}
>COMPADD:{}
>INSERT_POSITIONS:{12}
>NO:{___list_ambiguous}
>NO:{___list_beep}
>NO:{___list_packed}
>NO:{___list_rowsfirst}
>NO:{___list_types}
>line: {tst ___list_beep__ }{}
>COMPADD:{}
>INSERT_POSITIONS:{18}

 test_code 'B:[nN][oO]= M:_= M:{A-Z}={a-z}' example1_list
 comptest $'tst __no_listbe\t'
0:Documentation example for options, input "__no_listbe"
>line: {tst __no_listbeep }{}
>COMPADD:{}
>INSERT_POSITIONS:{17}

 test_code 'B:[nN][oO]= M:_= M:{A-Z}={a-z}' example1_list
 comptest $'tst nonono_listbe\t'
0:Documentation example for options, input "nonono_listbe"
>line: {tst nonono_listbeep }{}
>COMPADD:{}
>INSERT_POSITIONS:{19}

 lower_insensitive_M="M:{a-z}={A-Z}"
 lower_insensitive_m="m:{a-z}={A-Z}"
 example2_list=(ABC Abc abc)
 test_code $lower_insensitive_M example2_list
 comptest $'tst ab\tC\t'
0:Documentation example for lowercase insenitive M, input "ab\tC\t"
>line: {tst ab}{}
>COMPADD:{}
>INSERT_POSITIONS:{6}
>NO:{abC}
>NO:{abc}
>line: {tst abC }{}
>COMPADD:{}
>INSERT_POSITIONS:{7}

 test_code $lower_insensitive_m example2_list
 comptest $'tst A\t\t'
0:Documentation example for lowercase insenitive m, input "A\t\t" 
>line: {tst A}{}
>COMPADD:{}
>INSERT_POSITIONS:{5}
>NO:{ABC}
>NO:{Abc}
>line: {tst ABC}{}
>COMPADD:{}
>INSERT_POSITIONS:{5}

 example3_list=(ABC Abc abc)
 case_insensitive_M="M:{a-zA-Z}={A-Za-z}"
 case_insensitive_m="m:{a-zA-Z}={A-Za-z}"
 test_code $case_insensitive_M example3_list
 comptest $'tst aB\t\t'
0:Documentation example for case insenitive M, input "aB\t\t"
>line: {tst aB}{}
>COMPADD:{}
>INSERT_POSITIONS:{6}
>NO:{aBC}
>NO:{aBc}
>line: {tst aBC}{}
>COMPADD:{}
>INSERT_POSITIONS:{6}


 test_code $case_insensitive_m example3_list
 comptest $'tst aB\t\t'
0:Documentation example for case insenitive m, input "aB\t\t"
>line: {tst a}{BC}
>COMPADD:{}
>INSERT_POSITIONS:{5:7}
>line: {tst a}{BC}
>COMPADD:{}
>INSERT_POSITIONS:{5:7}
>NO:{ABC}
>NO:{Abc}
>NO:{abc}

  example4_matcher='r:|.=* r:|=*'
  example4_list=(comp.sources.unix comp.sources.misc 
  comp.graphics.algorithms comp.graphics.animation comp.graphics.api
  comp.graphics.apps comp.graphics.misc comp.graphics.packages
  comp.graphics.rendering comp.graphics.visualization comp.graphics.apps.alias
  comp.graphics.apps.gimp comp.graphics.apps.gnuplot
  comp.graphics.apps.lightwave comp.graphics.apps.pagemaker
  comp.graphics.apps.paint-shop-pro comp.graphics.apps.photoshop
  comp.graphics.apps.softimage comp.graphics.apps.ulead
  comp.graphics.rendering.misc comp.graphics.rendering.raytracing
  comp.graphics.rendering.renderman)
 test_code $example4_matcher example4_list
 comptest $'tst c.s.u\t'
0:Documentation example using input c.s.u
>line: {tst comp.sources.unix }{}
>COMPADD:{}
>INSERT_POSITIONS:{21}

 test_code $example4_matcher example4_list
 comptest $'tst c.g.\ta\t.\tp\ta\tg\t'
0:Documentation example using input c.g.\ta\t.\tp\ta\tg\t
>line: {tst comp.graphics.}{}
>COMPADD:{}
>INSERT_POSITIONS:{18}
>line: {tst comp.graphics.a}{}
>COMPADD:{}
>INSERT_POSITIONS:{19}
>NO:{comp.graphics.algorithms}
>NO:{comp.graphics.animation}
>NO:{comp.graphics.api}
>NO:{comp.graphics.apps}
>NO:{comp.graphics.apps.alias}
>NO:{comp.graphics.apps.gimp}
>NO:{comp.graphics.apps.gnuplot}
>NO:{comp.graphics.apps.lightwave}
>NO:{comp.graphics.apps.pagemaker}
>NO:{comp.graphics.apps.paint-shop-pro}
>NO:{comp.graphics.apps.photoshop}
>NO:{comp.graphics.apps.softimage}
>NO:{comp.graphics.apps.ulead}
>line: {tst comp.graphics.apps.}{}
>COMPADD:{}
>INSERT_POSITIONS:{23}
>line: {tst comp.graphics.apps.p}{}
>COMPADD:{}
>INSERT_POSITIONS:{24}
>NO:{comp.graphics.apps.pagemaker}
>NO:{comp.graphics.apps.paint-shop-pro}
>NO:{comp.graphics.apps.photoshop}
>line: {tst comp.graphics.apps.pa}{}
>COMPADD:{}
>INSERT_POSITIONS:{25}
>NO:{comp.graphics.apps.pagemaker}
>NO:{comp.graphics.apps.paint-shop-pro}
>line: {tst comp.graphics.apps.pagemaker }{}
>COMPADD:{}
>INSERT_POSITIONS:{32}

 test_code $example4_matcher example4_list
 comptest $'tst c...pag\t'
0:Documentation example using input c...pag\t
>line: {tst comp.graphics.apps.pagemaker }{}
>COMPADD:{}
>INSERT_POSITIONS:{32}

 test_code $example4_matcher example4_list
 comptest $'tst c...pa\tg\t'
0:Documentation example using input c...pa\tg\t
>line: {tst comp.graphics.apps.pa}{}
>COMPADD:{}
>INSERT_POSITIONS:{25}
>line: {tst comp.graphics.apps.pagemaker }{}
>COMPADD:{}
>INSERT_POSITIONS:{32}

 example5_matcher='r:|[.,_-]=* r:|=*'
 example5_list=(veryverylongfile.c veryverylongheader.h)
 test_code $example5_matcher example5_list
 comptest $'tst  v.c\tv.h\t'
0:Documentation example using input v.c\t
>line: {tst  veryverylongfile.c }{}
>COMPADD:{}
>INSERT_POSITIONS:{23}
>line: {tst  veryverylongfile.c veryverylongheader.h }{}
>COMPADD:{}
>INSERT_POSITIONS:{44}


 example6_list=(LikeTHIS FooHoo 5foo123 5bar234)
 test_code 'r:|[A-Z0-9]=* r:|=*' example6_list
 comptest $'tst H\t'
0:Documentation example using "r:|[A-Z0-9]=* r:|=*", input H
>line: {tst H}{}
>COMPADD:{}
>INSERT_POSITIONS:{}

 test_code 'r:|[A-Z0-9]=* r:|=*' example6_list
 comptest $'tst 2\t'
0:Documentation example using "r:|[A-Z0-9]=* r:|=*", input 2
>line: {tst 2}{}
>COMPADD:{}
>INSERT_POSITIONS:{}

 test_code 'r:|[A-Z0-9]=** r:|=*' example6_list
 comptest $'tst H\t'
0:Documentation example using "r:|[A-Z0-9]=** r:|=*", input H
>line: {tst H}{}
>COMPADD:{}
>INSERT_POSITIONS:{4}
>NO:{FooHoo}
>NO:{LikeTHIS}

 test_code 'r:|[A-Z0-9]=** r:|=*' example6_list
 comptest $'tst 2\t\t'
0:Documentation example using "r:|[A-Z0-9]=** r:|=*", input 2
>line: {tst 5}{23}
>COMPADD:{}
>INSERT_POSITIONS:{5:7}
>line: {tst 5}{23}
>COMPADD:{}
>INSERT_POSITIONS:{5:7}
>NO:{5bar234}
>NO:{5foo123}

 example7_matcher="r:[^A-Z0-9]||[A-Z0-9]=** r:|=*"
 example7_list=($example6_list)
 test_code $example7_matcher example7_list
 comptest $'tst H\t2\t'
0:Documentation example using "r:[^A-Z0-9]||[A-Z0-9]=** r:|=*"
>line: {tst FooHoo }{}
>COMPADD:{}
>INSERT_POSITIONS:{10}
>line: {tst FooHoo 5bar234 }{}
>COMPADD:{}
>INSERT_POSITIONS:{18}


 workers_7311_matcher="m:{a-z}={A-Z} r:|[.,_-]=* r:|=*"
 workers_7311_list=(Abc-Def-Ghij.txt Abc-def.ghi.jkl_mno.pqr.txt Abc_def_ghi_jkl_mno_pqr.txt)
 test_code $workers_7311_matcher workers_7311_list
 comptest $'tst a-a\t'
0:Bug from workers 7311
>line: {tst a-a}{}
>COMPADD:{}
>INSERT_POSITIONS:{}

 test_code $workers_7311_matcher workers_7311_list
 comptest $'tst a\t\t-d.\t'
0:Bug from workers_7311 
>line: {tst Abc}{}
>COMPADD:{}
>INSERT_POSITIONS:{7}
>line: {tst Abc}{}
>COMPADD:{}
>INSERT_POSITIONS:{7}
>NO:{Abc-Def-Ghij.txt}
>NO:{Abc-def.ghi.jkl_mno.pqr.txt}
>NO:{Abc_def_ghi_jkl_mno_pqr.txt}
>line: {tst Abc-def.ghi.jkl_mno.pqr.txt }{}
>COMPADD:{}
>INSERT_POSITIONS:{31}

 workers_10886_matcher="r:|[A-Z0-9]=* r:|=*"
 workers_10886_list=(BW UWB W)
 test_code $workers_10886_matcher workers_10886_list
 comptest $'tst W\t'
0:Bug from workers 10886
>line: {tst W }{}
>COMPADD:{}
>INSERT_POSITIONS:{5}

 workers_11081_matcher='m:{a-zA-Z}={A-Za-z} r:|[.,_-]=* r:[^A-Z0-9]||[A-Z0-9]=* r:[A-Z0-9]||[^A-Z0-9]=* r:[^0-9]||[0-9]=* r:|=*'
 workers_11081_list=(build.out build.out1 build.out2)
 test_code $workers_11081_matcher workers_11081_list
 comptest $'tst bui\t\t\t'
0:Bug from workers 11081
>line: {tst build.out}{}
>COMPADD:{}
>INSERT_POSITIONS:{13}
>line: {tst build.out}{}
>COMPADD:{}
>INSERT_POSITIONS:{13}
>NO:{build.out}
>NO:{build.out1}
>NO:{build.out2}
>line: {tst build.out}{}
>COMPADD:{}
>INSERT_POSITIONS:{13}


 workers_11388_matcher='r:|[:.]=* r:|=*'
 workers_11388_list=(a.b:0 c.d:1)
 test_code $workers_11388_matcher workers_11388_list
 comptest $'tst :\t'
0:Non-bug from workers 11388
>line: {tst :}{}
>COMPADD:{}
>INSERT_POSITIONS:{}

 workers_11388_matcher='r:|[:.]=** r:|=*'
 workers_11388_list=(a.b:0 c.d:1)
 test_code $workers_11388_matcher workers_11388_list
 comptest $'tst :\t'
0:Non-bug from workers 11388
>line: {tst .:}{}
>COMPADD:{}
>INSERT_POSITIONS:{4:5:6}

 workers_11586_matcher='r:|.=** r:[^0-9]||[0-9]=**'
 workers_11586_list=(c00.abc c01.abc.def.00.0)
 test_code $workers_11586_matcher workers_11586_list
 comptest $'tst c00\t.\ta\t'
0:Bug from workers 11586
>line: {tst c00}{}
>COMPADD:{}
>INSERT_POSITIONS:{6}
>NO:{c00.abc}
>NO:{c01.abc.def.00.0}
>line: {tst c00.}{}
>COMPADD:{}
>INSERT_POSITIONS:{7:8}
>NO:{c00.abc}
>NO:{c01.abc.def.00.0}
>line: {tst c00.abc }{}
>COMPADD:{}
>INSERT_POSITIONS:{11}

 workers_12995a_matcher='r:|/=* r:|=*'
 workers_12995a_list=(u1 u1/q1 u1/q1/e1 u2 u2/q1 u2/q1/e2 u2/q1/e2/a1 u2/q1/e2/a2 u3 u3/q1 u4 u4/q u4/q/a1 u4/q/a2)
 test_code $workers_12995a_matcher workers_12995a_list
 comptest $'tst u/q/a\t'
0:First test from workers 12995
>line: {tst u4/q/a}{}
>COMPADD:{}
>INSERT_POSITIONS:{10}

 workers_12995b_matcher='m:{a-z}={A-Z} r:|/=* r:|=*'
 workers_12995b_list=(../Completion/Core ../Completion/Commands)
 test_code $workers_12995b_matcher workers_12995b_list 
 comptest $'tst ../com/cor\002\002\002\002\002\002\002\t'
0:Second test from workers 12995
>line: {tst ../Completion/Core }{}
>COMPADD:{}
>INSERT_POSITIONS:{22}

 workers_13320_matcher='r:|[.,_-]=** r:[^0-9]||[0-9]=**'
 workers_13320_list=(glibc-2.1.94-3.i386.rpm glibc-devel-2.1.94-3.i386.rpm)
 workers_13320_list=($workers_13320_list  glibc-profile-2.1.94-3.i386.rpm)
 test_code $workers_13320_matcher workers_13320_list
 comptest $'tst glibc-2.1\t'
0:Test from workers 13320
>line: {tst glibc}{-2.1.94-3.i386.rpm}
>COMPADD:{}
>INSERT_POSITIONS:{9:27}

 workers_13345a_matcher='r:|[.,_-]=**'
 workers_13345a_list=(A.B.C A.B.C.D A.C)
 test_code $workers_13345a_matcher workers_13345a_list
 comptest $'tst A.C\t'
0:First test from workers 13345
>line: {tst A.C}{}
>COMPADD:{}
>INSERT_POSITIONS:{5:7}
>NO:{A.B.C}
>NO:{A.B.C.D}
>NO:{A.C}


 workers_13345b_matcher='r:|[.,_-]=** r:[^0-9]||[0-9]=**'
 workers_13345b_list=(a-b_1_2_2  a-b_2_0.gz a-b_2_0.zip)
 test_code $workers_13345b_matcher workers_13345b_list
 comptest $'tst a-b_2\t'
0:Second test from workers 13345
>line: {tst a-b_2_}{}
>COMPADD:{}
>INSERT_POSITIONS:{8:10}

 workers_13382_matcher='r:|.=**'
 workers_13382_list=(a.b.c  a.b.c.d  aA.bB.cB.dA  aA.bB.cC.dD  aD.bC.cB.dA aA.bC.cB.dA)
 test_code $workers_13382_matcher workers_13382_list
 comptest $'tst a...\tA\tC\t'
0:Test for insert positions
>line: {tst a.b.c.d}{}
>COMPADD:{}
>INSERT_POSITIONS:{5:7:9:11}
>line: {tst a.b}{.cB.dA}
>COMPADD:{}
>INSERT_POSITIONS:{5:7:13}
>line: {tst a}{.bC.cB.dA}
>COMPADD:{}
>INSERT_POSITIONS:{5:14}
>NO:{aA.bC.cB.dA}
>NO:{aD.bC.cB.dA}


%clean

  zmodload -ui zsh/zpty