26763: fix problem on failed cd -s to relative path
[zsh.git] / Test / Y02compmatch.ztst
blob7045800430d0aeb46edabd0a2814410abcab5213
1 # Tests for completion system matching control
3 # Most tests follow this format:
4 #       test_code $matcher_string selection_list
5 #       comptest -c "$code" $' tst input_string'
6 # test_code generates the string $codem which sets what words the completion
7 # should be selecting from.  The comptest function actually performs the
8 # completion test, using the completion function generated by test_code.
10 # This test also tests error conditions that compadd reports, so output also
11 # contains the compadd output.
13 %prep
14   if ( zmodload -i zsh/zpty ) >/dev/null 2>&1; then
15     . $ZTST_srcdir/comptest
16     mkdir match.tmp
17     cd match.tmp
18     comptestinit -z $ZTST_testdir/../Src/zsh &&
19     {
20       list1=(IndianRed IndianRed2 IndianRed3 IndianRed4)
21       test_code () {
22         matcher=$1;
23         list=$2;
24         code="compdef _tst tst ; _tst () { echo -n '<COMPADD>';compadd -M '"
25         code="$code$matcher"
26         code="$code'  - ${(P)list} ; echo  -n '</COMPADD>'"
27           code="$code; $extra_cmd"
28           code="$code; echo -n '<INSERT_POSITIONS>'"
29           code="$code; echo \$compstate[insert_positions]"
30           code="$code; echo -n '</INSERT_POSITIONS>'"
31           code="$code}"
32         comptesteval "$code"
33       }
34     }
35   else
36     ZTST_unimplemented="the zsh/zpty module is not available"
37   fi
40 %test
42  test_code z: list1
43  comptest  $'tst \t'
44 0:Match Error for "z:"
45 >line: {tst }{}
46 >COMPADD:{_tst:compadd: unknown match specification character `z'}
47 >INSERT_POSITIONS:{}
49  test_code m: list1
50  comptest  $'tst \t'
51 0:Match Error for "m:"
52 >line: {tst }{}
53 >COMPADD:{_tst:compadd: missing patterns}
54 >INSERT_POSITIONS:{}
56  test_code M: list1
57  comptest $'tst \t'
58 0:Match Error for "M:"
59 >line: {tst }{}
60 >COMPADD:{_tst:compadd: missing patterns}
61 >INSERT_POSITIONS:{}
63  test_code r: list1
64  comptest $'tst \t'
65 0:Match Error "r:"
66 >line: {tst }{}
67 >COMPADD:{_tst:compadd: missing patterns}
68 >INSERT_POSITIONS:{}
70  test_code R: list1
71  comptest $'tst \t'
72 0:Match Error "R:"
73 >line: {tst }{}
74 >COMPADD:{_tst:compadd: missing patterns}
75 >INSERT_POSITIONS:{}
77  test_code l: list1
78  comptest $'tst \t'
79 0:Match Error for "l:"
80 >line: {tst }{}
81 >COMPADD:{_tst:compadd: missing patterns}
82 >INSERT_POSITIONS:{}
84  test_code L: list1
85  comptest $'tst \t'
86 0:Match Error for "L:"
87 >line: {tst }{}
88 >COMPADD:{_tst:compadd: missing patterns}
89 >INSERT_POSITIONS:{}
91  test_code 'm:{0-9' list1
92  comptest $'tst \t'
93 0:Match Error for "m:{0-9"
94 >line: {tst }{}
95 >COMPADD:{_tst:compadd: unterminated character class}
96 >INSERT_POSITIONS:{}
98  test_code 'm:{0-9}' list1
99  comptest $'tst \t'
100 0:Match Error for "m:{0-9}"
101 >line: {tst }{}
102 >COMPADD:{_tst:compadd: missing word pattern}
103 >INSERT_POSITIONS:{}
105  test_code 'm:{0-9}={' list1
106  comptest $'tst \t'
107 0:Match Error for "m:{0-9}={"
108 >line: {tst }{}
109 >COMPADD:{_tst:compadd: unterminated character class}
110 >INSERT_POSITIONS:{}
112  test_code 'm:{0-9}={0-' list1
113  comptest $'tst \t'
114 0:Match Error for "m:{0-9}={0-"
115 >line: {tst }{}
116 >COMPADD:{_tst:compadd: unterminated character class}
117 >INSERT_POSITIONS:{}
119  test_code 'm:{0-9}={-' list1
120  comptest $'tst \t'
121 0:Match Error for "m:{0-9}={-"
122 >line: {tst }{}
123 >COMPADD:{_tst:compadd: unterminated character class}
124 >INSERT_POSITIONS:{}
126  test_code r: list1
127  comptest $'tst \t'
128 0:Match Error "r:"
129 >line: {tst }{}
130 >COMPADD:{_tst:compadd: missing patterns}
131 >INSERT_POSITIONS:{}
133   example1_list=(
134         kshoptionprint        shglob              
135         listambiguous         shinstdin           
136         listbeep              shnullcmd           
137         listpacked            shoptionletters     
138         listrowsfirst         shortloops          
139         listtypes             shwordsplit
140    )
141  options_matcher='L:|[nN][oO]= M:_= M:{A-Z}={a-z}'
142  test_code $options_matcher example1_list
143  comptest $'tst nolistbee\t'
144 0:Documentation example for options, input "nolistbee"
145 >line: {tst nolistbeep }{}
146 >COMPADD:{}
147 >INSERT_POSITIONS:{14}
150  test_code $options_matcher example1_list
151  comptest $'tst list_bee\t'
152 0:Documentation example for options, input "list_bee"
153 >line: {tst list_beep }{}
154 >COMPADD:{}
155 >INSERT_POSITIONS:{13}
157  test_code $options_matcher example1_list
158  comptest $'tst ListBee\t'
159 0:Documentation example for options, input "ListBee"
160 >line: {tst ListBeep }{}
161 >COMPADD:{}
162 >INSERT_POSITIONS:{12}
164  test_code $options_matcher example1_list
165  comptest $'tst NOList\tB\t'
166 0:Documentation example for options, input "NOList"
167 >line: {tst NOList}{}
168 >COMPADD:{}
169 >INSERT_POSITIONS:{10}
170 >NO:{NOListambiguous}
171 >NO:{NOListbeep}
172 >NO:{NOListpacked}
173 >NO:{NOListrowsfirst}
174 >NO:{NOListtypes}
175 >line: {tst NOListBeep }{}
176 >COMPADD:{}
177 >INSERT_POSITIONS:{14}
180  test_code $options_matcher example1_list
181  comptest $'tst NO_List\t__\tB\t'
182 0:Documentation example for options, input "NO_List\t__\tB\t"
183 >line: {tst NO_List}{}
184 >COMPADD:{}
185 >INSERT_POSITIONS:{11}
186 >NO:{NO_Listambiguous}
187 >NO:{NO_Listbeep}
188 >NO:{NO_Listpacked}
189 >NO:{NO_Listrowsfirst}
190 >NO:{NO_Listtypes}
191 >line: {tst NO_List__}{}
192 >COMPADD:{}
193 >INSERT_POSITIONS:{13}
194 >NO:{NO_List__ambiguous}
195 >NO:{NO_List__beep}
196 >NO:{NO_List__packed}
197 >NO:{NO_List__rowsfirst}
198 >NO:{NO_List__types}
199 >line: {tst NO_List__Beep }{}
200 >COMPADD:{}
201 >INSERT_POSITIONS:{17}
203  test_code $options_matcher example1_list
204  comptest $'tst __\tN\t__o\t___\tlist_\tbeep__\t'
205 0:Documentation example for options, input "__\tN\t__o\t___\tlist_\tbeep__\t" 
206 >line: {tst __}{}
207 >COMPADD:{}
208 >INSERT_POSITIONS:{6}
209 >NO:{__kshoptionprint}
210 >NO:{__listambiguous}
211 >NO:{__listbeep}
212 >NO:{__listpacked}
213 >NO:{__listrowsfirst}
214 >NO:{__listtypes}
215 >NO:{__shglob}
216 >NO:{__shinstdin}
217 >NO:{__shnullcmd}
218 >NO:{__shoptionletters}
219 >NO:{__shortloops}
220 >NO:{__shwordsplit}
221 >line: {tst __N}{}
222 >COMPADD:{}
223 >INSERT_POSITIONS:{}
224 >line: {tst __N__o}{}
225 >COMPADD:{}
226 >INSERT_POSITIONS:{}
227 >line: {tst __N__o___}{}
228 >COMPADD:{}
229 >INSERT_POSITIONS:{}
230 >line: {tst __N__o___list_}{}
231 >COMPADD:{}
232 >INSERT_POSITIONS:{}
233 >line: {tst __N__o___list_beep__}{}
234 >COMPADD:{}
235 >INSERT_POSITIONS:{}
237  test_code $options_matcher example1_list
238  comptest $'tst __\tNo\t___\tlist_\tbeep__\t'
239 0:Documentation example for options, input "__\tNo\t___\tlist_\tbeep__\t" 
240 >line: {tst __}{}
241 >COMPADD:{}
242 >INSERT_POSITIONS:{6}
243 >NO:{__kshoptionprint}
244 >NO:{__listambiguous}
245 >NO:{__listbeep}
246 >NO:{__listpacked}
247 >NO:{__listrowsfirst}
248 >NO:{__listtypes}
249 >NO:{__shglob}
250 >NO:{__shinstdin}
251 >NO:{__shnullcmd}
252 >NO:{__shoptionletters}
253 >NO:{__shortloops}
254 >NO:{__shwordsplit}
255 >line: {tst __No}{}
256 >COMPADD:{}
257 >INSERT_POSITIONS:{}
258 >line: {tst __No___}{}
259 >COMPADD:{}
260 >INSERT_POSITIONS:{}
261 >line: {tst __No___list_}{}
262 >COMPADD:{}
263 >INSERT_POSITIONS:{}
264 >line: {tst __No___list_beep__}{}
265 >COMPADD:{}
266 >INSERT_POSITIONS:{}
269  test_code $options_matcher example1_list
270  comptest $'tst ___\tlist_\tbeep__\t'
271 0:Documentation example for options, input "___\tlist_\tbeep__\t" 
272 >line: {tst ___}{}
273 >COMPADD:{}
274 >INSERT_POSITIONS:{7}
275 >NO:{___kshoptionprint}
276 >NO:{___listambiguous}
277 >NO:{___listbeep}
278 >NO:{___listpacked}
279 >NO:{___listrowsfirst}
280 >NO:{___listtypes}
281 >NO:{___shglob}
282 >NO:{___shinstdin}
283 >NO:{___shnullcmd}
284 >NO:{___shoptionletters}
285 >NO:{___shortloops}
286 >NO:{___shwordsplit}
287 >line: {tst ___list_}{}
288 >COMPADD:{}
289 >INSERT_POSITIONS:{12}
290 >NO:{___list_ambiguous}
291 >NO:{___list_beep}
292 >NO:{___list_packed}
293 >NO:{___list_rowsfirst}
294 >NO:{___list_types}
295 >line: {tst ___list_beep__ }{}
296 >COMPADD:{}
297 >INSERT_POSITIONS:{18}
299  test_code 'B:[nN][oO]= M:_= M:{A-Z}={a-z}' example1_list
300  comptest $'tst __no_listbe\t'
301 0:Documentation example for options, input "__no_listbe"
302 >line: {tst __no_listbeep }{}
303 >COMPADD:{}
304 >INSERT_POSITIONS:{17}
306  test_code 'B:[nN][oO]= M:_= M:{A-Z}={a-z}' example1_list
307  comptest $'tst nonono_listbe\t'
308 0:Documentation example for options, input "nonono_listbe"
309 >line: {tst nonono_listbeep }{}
310 >COMPADD:{}
311 >INSERT_POSITIONS:{19}
313  lower_insensitive_M="M:{a-z}={A-Z}"
314  lower_insensitive_m="m:{a-z}={A-Z}"
315  example2_list=(ABC Abc abc)
316  test_code $lower_insensitive_M example2_list
317  comptest $'tst ab\tC\t'
318 0:Documentation example for lowercase insenitive M, input "ab\tC\t"
319 >line: {tst ab}{}
320 >COMPADD:{}
321 >INSERT_POSITIONS:{6}
322 >NO:{abC}
323 >NO:{abc}
324 >line: {tst abC }{}
325 >COMPADD:{}
326 >INSERT_POSITIONS:{7}
328  test_code $lower_insensitive_m example2_list
329  comptest $'tst A\t\t'
330 0:Documentation example for lowercase insenitive m, input "A\t\t" 
331 >line: {tst A}{}
332 >COMPADD:{}
333 >INSERT_POSITIONS:{5}
334 >NO:{ABC}
335 >NO:{Abc}
336 >line: {tst ABC}{}
337 >COMPADD:{}
338 >INSERT_POSITIONS:{5}
340  example3_list=(ABC Abc abc)
341  case_insensitive_M="M:{a-zA-Z}={A-Za-z}"
342  case_insensitive_m="m:{a-zA-Z}={A-Za-z}"
343  test_code $case_insensitive_M example3_list
344  comptest $'tst aB\t\t'
345 0:Documentation example for case insenitive M, input "aB\t\t"
346 >line: {tst aB}{}
347 >COMPADD:{}
348 >INSERT_POSITIONS:{6}
349 >NO:{aBC}
350 >NO:{aBc}
351 >line: {tst aBC}{}
352 >COMPADD:{}
353 >INSERT_POSITIONS:{6}
356  test_code $case_insensitive_m example3_list
357  comptest $'tst aB\t\t'
358 0:Documentation example for case insenitive m, input "aB\t\t"
359 >line: {tst a}{BC}
360 >COMPADD:{}
361 >INSERT_POSITIONS:{5:7}
362 >line: {tst a}{BC}
363 >COMPADD:{}
364 >INSERT_POSITIONS:{5:7}
365 >NO:{ABC}
366 >NO:{Abc}
367 >NO:{abc}
369   example4_matcher='r:|.=* r:|=*'
370   example4_list=(comp.sources.unix comp.sources.misc 
371   comp.graphics.algorithms comp.graphics.animation comp.graphics.api
372   comp.graphics.apps comp.graphics.misc comp.graphics.packages
373   comp.graphics.rendering comp.graphics.visualization comp.graphics.apps.alias
374   comp.graphics.apps.gimp comp.graphics.apps.gnuplot
375   comp.graphics.apps.lightwave comp.graphics.apps.pagemaker
376   comp.graphics.apps.paint-shop-pro comp.graphics.apps.photoshop
377   comp.graphics.apps.softimage comp.graphics.apps.ulead
378   comp.graphics.rendering.misc comp.graphics.rendering.raytracing
379   comp.graphics.rendering.renderman)
380  test_code $example4_matcher example4_list
381  comptest $'tst c.s.u\t'
382 0:Documentation example using input c.s.u
383 >line: {tst comp.sources.unix }{}
384 >COMPADD:{}
385 >INSERT_POSITIONS:{21}
387  test_code $example4_matcher example4_list
388  comptest $'tst c.g.\ta\t.\tp\ta\tg\t'
389 0:Documentation example using input c.g.\ta\t.\tp\ta\tg\t
390 >line: {tst comp.graphics.}{}
391 >COMPADD:{}
392 >INSERT_POSITIONS:{18}
393 >line: {tst comp.graphics.a}{}
394 >COMPADD:{}
395 >INSERT_POSITIONS:{19}
396 >NO:{comp.graphics.algorithms}
397 >NO:{comp.graphics.animation}
398 >NO:{comp.graphics.api}
399 >NO:{comp.graphics.apps}
400 >NO:{comp.graphics.apps.alias}
401 >NO:{comp.graphics.apps.gimp}
402 >NO:{comp.graphics.apps.gnuplot}
403 >NO:{comp.graphics.apps.lightwave}
404 >NO:{comp.graphics.apps.pagemaker}
405 >NO:{comp.graphics.apps.paint-shop-pro}
406 >NO:{comp.graphics.apps.photoshop}
407 >NO:{comp.graphics.apps.softimage}
408 >NO:{comp.graphics.apps.ulead}
409 >line: {tst comp.graphics.apps.}{}
410 >COMPADD:{}
411 >INSERT_POSITIONS:{23}
412 >line: {tst comp.graphics.apps.p}{}
413 >COMPADD:{}
414 >INSERT_POSITIONS:{24}
415 >NO:{comp.graphics.apps.pagemaker}
416 >NO:{comp.graphics.apps.paint-shop-pro}
417 >NO:{comp.graphics.apps.photoshop}
418 >line: {tst comp.graphics.apps.pa}{}
419 >COMPADD:{}
420 >INSERT_POSITIONS:{25}
421 >NO:{comp.graphics.apps.pagemaker}
422 >NO:{comp.graphics.apps.paint-shop-pro}
423 >line: {tst comp.graphics.apps.pagemaker }{}
424 >COMPADD:{}
425 >INSERT_POSITIONS:{32}
427  test_code $example4_matcher example4_list
428  comptest $'tst c...pag\t'
429 0:Documentation example using input c...pag\t
430 >line: {tst comp.graphics.apps.pagemaker }{}
431 >COMPADD:{}
432 >INSERT_POSITIONS:{32}
434  test_code $example4_matcher example4_list
435  comptest $'tst c...pa\tg\t'
436 0:Documentation example using input c...pa\tg\t
437 >line: {tst comp.graphics.apps.pa}{}
438 >COMPADD:{}
439 >INSERT_POSITIONS:{25}
440 >line: {tst comp.graphics.apps.pagemaker }{}
441 >COMPADD:{}
442 >INSERT_POSITIONS:{32}
444  example5_matcher='r:|[.,_-]=* r:|=*'
445  example5_list=(veryverylongfile.c veryverylongheader.h)
446  test_code $example5_matcher example5_list
447  comptest $'tst  v.c\tv.h\t'
448 0:Documentation example using input v.c\t
449 >line: {tst  veryverylongfile.c }{}
450 >COMPADD:{}
451 >INSERT_POSITIONS:{23}
452 >line: {tst  veryverylongfile.c veryverylongheader.h }{}
453 >COMPADD:{}
454 >INSERT_POSITIONS:{44}
457  example6_list=(LikeTHIS FooHoo 5foo123 5bar234)
458  test_code 'r:|[A-Z0-9]=* r:|=*' example6_list
459  comptest $'tst H\t'
460 0:Documentation example using "r:|[A-Z0-9]=* r:|=*", input H
461 >line: {tst H}{}
462 >COMPADD:{}
463 >INSERT_POSITIONS:{}
465  test_code 'r:|[A-Z0-9]=* r:|=*' example6_list
466  comptest $'tst 2\t'
467 0:Documentation example using "r:|[A-Z0-9]=* r:|=*", input 2
468 >line: {tst 2}{}
469 >COMPADD:{}
470 >INSERT_POSITIONS:{}
472  test_code 'r:|[A-Z0-9]=** r:|=*' example6_list
473  comptest $'tst H\t'
474 0:Documentation example using "r:|[A-Z0-9]=** r:|=*", input H
475 >line: {tst H}{}
476 >COMPADD:{}
477 >INSERT_POSITIONS:{4}
478 >NO:{FooHoo}
479 >NO:{LikeTHIS}
481  test_code 'r:|[A-Z0-9]=** r:|=*' example6_list
482  comptest $'tst 2\t\t'
483 0:Documentation example using "r:|[A-Z0-9]=** r:|=*", input 2
484 >line: {tst 5}{23}
485 >COMPADD:{}
486 >INSERT_POSITIONS:{5:7}
487 >line: {tst 5}{23}
488 >COMPADD:{}
489 >INSERT_POSITIONS:{5:7}
490 >NO:{5bar234}
491 >NO:{5foo123}
493  example7_matcher="r:[^A-Z0-9]||[A-Z0-9]=** r:|=*"
494  example7_list=($example6_list)
495  test_code $example7_matcher example7_list
496  comptest $'tst H\t2\t'
497 0:Documentation example using "r:[^A-Z0-9]||[A-Z0-9]=** r:|=*"
498 >line: {tst FooHoo }{}
499 >COMPADD:{}
500 >INSERT_POSITIONS:{10}
501 >line: {tst FooHoo 5bar234 }{}
502 >COMPADD:{}
503 >INSERT_POSITIONS:{18}
506  workers_7311_matcher="m:{a-z}={A-Z} r:|[.,_-]=* r:|=*"
507  workers_7311_list=(Abc-Def-Ghij.txt Abc-def.ghi.jkl_mno.pqr.txt Abc_def_ghi_jkl_mno_pqr.txt)
508  test_code $workers_7311_matcher workers_7311_list
509  comptest $'tst a-a\t'
510 0:Bug from workers 7311
511 >line: {tst a-a}{}
512 >COMPADD:{}
513 >INSERT_POSITIONS:{}
515  test_code $workers_7311_matcher workers_7311_list
516  comptest $'tst a\t\t-d.\t'
517 0:Bug from workers_7311 
518 >line: {tst Abc}{}
519 >COMPADD:{}
520 >INSERT_POSITIONS:{7}
521 >line: {tst Abc}{}
522 >COMPADD:{}
523 >INSERT_POSITIONS:{7}
524 >NO:{Abc-Def-Ghij.txt}
525 >NO:{Abc-def.ghi.jkl_mno.pqr.txt}
526 >NO:{Abc_def_ghi_jkl_mno_pqr.txt}
527 >line: {tst Abc-def.ghi.jkl_mno.pqr.txt }{}
528 >COMPADD:{}
529 >INSERT_POSITIONS:{31}
531  workers_10886_matcher="r:|[A-Z0-9]=* r:|=*"
532  workers_10886_list=(BW UWB W)
533  test_code $workers_10886_matcher workers_10886_list
534  comptest $'tst W\t'
535 0:Bug from workers 10886
536 >line: {tst W }{}
537 >COMPADD:{}
538 >INSERT_POSITIONS:{5}
540  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:|=*'
541  workers_11081_list=(build.out build.out1 build.out2)
542  test_code $workers_11081_matcher workers_11081_list
543  comptest $'tst bui\t\t\t'
544 0:Bug from workers 11081
545 >line: {tst build.out}{}
546 >COMPADD:{}
547 >INSERT_POSITIONS:{13}
548 >line: {tst build.out}{}
549 >COMPADD:{}
550 >INSERT_POSITIONS:{13}
551 >NO:{build.out}
552 >NO:{build.out1}
553 >NO:{build.out2}
554 >line: {tst build.out}{}
555 >COMPADD:{}
556 >INSERT_POSITIONS:{13}
559  workers_11388_matcher='r:|[:.]=* r:|=*'
560  workers_11388_list=(a.b:0 c.d:1)
561  test_code $workers_11388_matcher workers_11388_list
562  comptest $'tst :\t'
563 0:Non-bug from workers 11388
564 >line: {tst :}{}
565 >COMPADD:{}
566 >INSERT_POSITIONS:{}
568  workers_11388_matcher='r:|[:.]=** r:|=*'
569  workers_11388_list=(a.b:0 c.d:1)
570  test_code $workers_11388_matcher workers_11388_list
571  comptest $'tst :\t'
572 0:Non-bug from workers 11388
573 >line: {tst .:}{}
574 >COMPADD:{}
575 >INSERT_POSITIONS:{4:5:6}
577  workers_11586_matcher='r:|.=** r:[^0-9]||[0-9]=**'
578  workers_11586_list=(c00.abc c01.abc.def.00.0)
579  test_code $workers_11586_matcher workers_11586_list
580  comptest $'tst c00\t.\ta\t'
581 0:Bug from workers 11586
582 >line: {tst c00}{}
583 >COMPADD:{}
584 >INSERT_POSITIONS:{6}
585 >NO:{c00.abc}
586 >NO:{c01.abc.def.00.0}
587 >line: {tst c00.}{}
588 >COMPADD:{}
589 >INSERT_POSITIONS:{7:8}
590 >NO:{c00.abc}
591 >NO:{c01.abc.def.00.0}
592 >line: {tst c00.abc }{}
593 >COMPADD:{}
594 >INSERT_POSITIONS:{11}
596  workers_12995a_matcher='r:|/=* r:|=*'
597  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)
598  test_code $workers_12995a_matcher workers_12995a_list
599  comptest $'tst u/q/a\t'
600 0:First test from workers 12995
601 >line: {tst u4/q/a}{}
602 >COMPADD:{}
603 >INSERT_POSITIONS:{10}
605  workers_12995b_matcher='m:{a-z}={A-Z} r:|/=* r:|=*'
606  workers_12995b_list=(../Completion/Core ../Completion/Commands)
607  test_code $workers_12995b_matcher workers_12995b_list 
608  comptest $'tst ../com/cor\002\002\002\002\002\002\002\t'
609 0:Second test from workers 12995
610 >line: {tst ../Completion/Core }{}
611 >COMPADD:{}
612 >INSERT_POSITIONS:{22}
614  workers_13320_matcher='r:|[.,_-]=** r:[^0-9]||[0-9]=**'
615  workers_13320_list=(glibc-2.1.94-3.i386.rpm glibc-devel-2.1.94-3.i386.rpm)
616  workers_13320_list=($workers_13320_list  glibc-profile-2.1.94-3.i386.rpm)
617  test_code $workers_13320_matcher workers_13320_list
618  comptest $'tst glibc-2.1\t'
619 0:Test from workers 13320
620 >line: {tst glibc}{-2.1.94-3.i386.rpm}
621 >COMPADD:{}
622 >INSERT_POSITIONS:{9:27}
624  test_code $workers_13320_matcher workers_13320_list
625  comptest $'tst g-2\t'
626 0:Test from workers 13320
627 >line: {tst glibc}{-2.1.94-3.i386.rpm}
628 >COMPADD:{}
629 >INSERT_POSITIONS:{9:27}
631  workers_13345a_matcher='r:|[.,_-]=**'
632  workers_13345a_list=(A.B.C A.B.C.D A.C)
633  test_code $workers_13345a_matcher workers_13345a_list
634  comptest $'tst A.C\t'
635 0:First test from workers 13345
636 >line: {tst A.C}{}
637 >COMPADD:{}
638 >INSERT_POSITIONS:{5:7}
639 >NO:{A.B.C}
640 >NO:{A.B.C.D}
641 >NO:{A.C}
644  workers_13345b_matcher='r:|[.,_-]=** r:[^0-9]||[0-9]=**'
645  workers_13345b_list=(a-b_1_2_2  a-b_2_0.gz a-b_2_0.zip)
646  test_code $workers_13345b_matcher workers_13345b_list
647  comptest $'tst a-b_2\t'
648 0:Second test from workers 13345
649 >line: {tst a-b_2_}{}
650 >COMPADD:{}
651 >INSERT_POSITIONS:{8:10}
653  workers_13382_matcher='r:|.=**'
654  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)
655  test_code $workers_13382_matcher workers_13382_list
656  comptest $'tst a...\tA\tC\t'
657 0:Test for insert positions
658 >line: {tst a.b.c.d}{}
659 >COMPADD:{}
660 >INSERT_POSITIONS:{5:7:9:11}
661 >line: {tst a.b}{.cB.dA}
662 >COMPADD:{}
663 >INSERT_POSITIONS:{5:7:13}
664 >line: {tst a}{.bC.cB.dA}
665 >COMPADD:{}
666 >INSERT_POSITIONS:{5:14}
667 >NO:{aA.bC.cB.dA}
668 >NO:{aD.bC.cB.dA}
670  users_12227_matcher='r:|[-./_]=* r:|=* l:|=*'
671  users_12227_list=(foo-bar-abc foo-bar-def foo-bar-ghi)
672  test_code $users_12227_matcher users_12227_list
673  comptest $'tst bar\t'
674 0:Test for wildcard left anchor with partial word right anchors
675 >line: {tst foo-bar-}{}
676 >COMPADD:{}
677 >INSERT_POSITIONS:{12}
679 %clean
681   zmodload -ui zsh/zpty