1 &  *****************************************************
  2 &  *                                                   *
  3 &  * Copyright (C) 1986 by Massachusetts Institute of  *
  4 &  * Technology and Honeywell Information Systems Inc. *
  5 &  *                                                   *
  6 &  *****************************************************
  7 
  8 &
  9 &  HISTORY COMMENTS:
 10 &   1) change(86-08-19,JSLove), approve(86-08-19,MCR7518),
 11 &      audit(86-09-14,Parisek), install(86-10-02,MR12.0-1175):
 12 &      Created as a tool to verify the correctness of the check_star_name_ and
 13 &      match_star_name_ implementation.
 14 &                                                       END HISTORY COMMENTS
 15 &
 16 &command_line off
 17 &-
 18 &- This exec_com is used to test new versions of match_star_name_, which also
 19 &- includes the entrypoints check_star_name_, check_star_name_$entry, and
 20 &- check_star_name_$path.  It does this by using the command
 21 &- test_match_star_name.  This command takes a keyword as its first argument,
 22 &- a star name as its second argument, and optional additional arguments which
 23 &- are matched against the star name.  The keyword specifies what the
 24 &- acceptable error codes are from the various tests that are made.  If the
 25 &- results of the calls are not correctly predicted by the keyword, and error
 26 &- message is printed.  In addition, it further tests the check_star_name_
 27 &- entrypoint using the test_check_star_name comment.  This command takes a
 28 &- starname to be tested as its first argument, a comma separated list of
 29 &- keywords as its second argument which is used to construct the control
 30 &- mask, a keyword or digit as its third argument which is the expected star
 31 &- type, and a keyword or "0" as its fourth argument which is the expected
 32 &- error code.  An error message is printed if the actual star type or error
 33 &- code is not correctly predicted by the arguments.
 34 &-
 35 &- test_match_star_name makes calls in the following order:
 36 &-
 37 &- 1)  Call check_star_name_ (starname, CHECK_STAR_IGNORE_ALL, star_type, code);
 38 &- 2)  Call check_star_name_$entry (starname, code);
 39 &- 3)  Call check_star_name_$path (starname, code);
 40 &- 4)  Call match_star_name_ (starname, starname, code);
 41 &- 5+) Call match_star_name_ (matchname, starname, code);
 42 &-
 43 &- Possible keywords:
 44 &-
 45 &-   0    All tests return 0.
 46 &-   1    All check entries return 1, matches return 0.
 47 &-   2    All check entries return 2, matches return 0.
 48 &-   b    All entries return badstar.
 49 &-   0b   $entry returns badstar, all others 0.
 50 &-   0bb  $entry and $path return badstar, others 0.
 51 &-   1b   $entry returns badstar, checks 1, matches 0.
 52 &-   1b0  $entry returns badstar, $path 0, check 1, matches 0.
 53 &-   1b2  $entry returns badstar, $path 2, check 1, matches 0.
 54 &-   1bb  $entry and $path return badstar, check 1, matches 0.
 55 &-   2b   $entry returns badstar, checks 2, matches 0.
 56 &-   bb0  $entry returns badstar, $path 0, others badstar.
 57 &-   bb1  $entry returns badstar, $path 1, others badstar.
 58 &-   bb2  $entry returns badstar, $path 2, others badstar.
 59 &-
 60 &- Appending an "n" to any keyword specifies that tests 5+ will return
 61 &- error_table_$nomatch.  This is possible even when the starname is bad
 62 &- because the mismatch may occur before the invalidity is discovered.
 63 &- Test 4, matching the starname against itself, must always return
 64 &- either 0 or error_table_$badstar.  It returns badstar in exactly
 65 &- the same cases that check_star_name_ does.
 66 ^L
 67 &print Demonstrate star name tester (8 errors must follow):
 68 &command_line on
 69 test_match_star_name  1       ***
 70 test_match_star_name  2       xx        yy
 71 &command_line off
 72 &print No errors may follow this point.
 73 ^L
 74 &- Test constants with and without dots.  These constants are identified as
 75 &- type zero star names and matched with a single PL/I comparison.
 76 
 77 test_match_star_name  0n      xxxxxx    ""  .  x  xx  xxx  xxxx  xxxxx  xxxxxxx  xxxxxxxx  xxxxxxxxx  xxxxxy  x.x  x.x.x.x
 78 test_match_star_name  0n      x.x.x.x   ""  .  x  xxxxxx  xxxxxxx  xxxxxxxx  x.x  x.x.x  x.x.x.x.x  .x.x.  x...x  xx.xx.xx.xx
 79 
 80 &- Now lets try lots of type 2 star names.  Every one with only doublestar
 81 &- components and with a single star component up to 22 chars long.
 82 
 83 test_match_star_name  2       **        **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 84 test_match_star_name  2       **.*      **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 85 test_match_star_name  2       *.**      **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 86 test_match_star_name  2       **.**     **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 87 test_match_star_name  2       *.**.**   **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 88 test_match_star_name  2       **.*.**   **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 89 test_match_star_name  2       **.**.*   **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 90 test_match_star_name  2       **.**.**  **.*  *.**  ""  .  x  x.x  x.x.x  x.x.x.x.  ?.?  ??  xx  xxx  xxxxxxxxx
 91 
 92 test_match_star_name  2       (**.**.**.**  **.**.**.**.**  **.**.**.**.**.**  **.**.**.**.**.**.**  **.**.**.**.**.**.**.**)
 93 test_match_star_name  2       (**.**.**.**.**.**.**.**.**  **.**.**.**.**.**.**.**.**.**  **.**.**.**.**.**.**.**.**.**.**)
 94 
 95 test_match_star_name  2       (*.**.**.**.**.**.**.**  *.**.**.**.**.**.**  *.**.**.**.**.**  *.**.**.**.**  *.**.**.**)
 96 test_match_star_name  2       (**.*.**.**.**.**.**.**  **.*.**.**.**.**.**  **.*.**.**.**.**  **.*.**.**.**  **.*.**.**)
 97 test_match_star_name  2       (**.**.*.**.**.**.**.**  **.**.*.**.**.**.**  **.**.*.**.**.**  **.**.*.**.**  **.**.*.**)
 98 test_match_star_name  2       (**.**.**.*.**.**.**.**  **.**.**.*.**.**.**  **.**.**.*.**.**  **.**.**.*.**  **.**.**.*)
 99 test_match_star_name  2       (**.**.**.**.*.**.**.**  **.**.**.**.*.**.**  **.**.**.**.*.**  **.**.**.**.*)
100 test_match_star_name  2       (**.**.**.**.**.*.**.**  **.**.**.**.**.*.**  **.**.**.**.**.*)
101 test_match_star_name  2       (**.**.**.**.**.**.*.**  **.**.**.**.**.**.*)
102 test_match_star_name  2       (**.**.**.**.**.**.**.*)
103 
104 &- Out and out BAD star names (Multics spank).
105 
106 test_match_star_name  b       (***  ****  ***.*  *.***  foo***  ***foo  *..***  **..***  *.**.*.***  foo***bar)
107 
108 test_match_star_name  bn      *.*foo***           ""  .  ..  ...  foo  foo.fo
109 test_match_star_name  bn      *.*foo.***          ""  .  ..  ...  foo  foo.fo
110 
111 &- Test that overlength names are detected and rejected by
112 &- check_star_name_$entry, but are OK for other entrypoints.
113 &- First try constants.
114 
115 test_match_star_name  0bn     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx       "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
116 test_match_star_name  0bn     xxxxxxxxxx.xxxxxxxxxxx.xxxxxxxxxx       "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
117 
118 &- Make sure that trailing spaces are not counted in this check.
119 
120 test_match_star_name  0       "xxxxxxxx                                "  xxxxxxxx
121 test_match_star_name  0n      "xxxxxxxx                                "  ""  xxxxx  xxxx.xxx  xxxxxxxxxx
122 test_match_star_name  2       "**.*                                    "
123 test_match_star_name  1       "foo*bar                                 "  foobar  fooxxxbar
124 
125 &- Make sure that leading and embedded spaces work.
126 
127 test_match_star_name  0n      "   foo   bar"      foobar   "foo   bar"  "   foobar"
128 test_match_star_name  1       "   *.   *"         "   foo.   bar"
129 test_match_star_name  1n      "   *.   *"         foo.bar  "   foo.bar"   "foo.   bar"
130 
131 &- Next try overlength star names.
132 
133 test_match_star_name  1b      abcdefghijklmnopqrstuvwxyz012346.**     abcdefghijklmnopqrstuvwxyz012346
134 test_match_star_name  1b      abcdefghijklmnopqrstuvwxyz012346.**     abcdefghijklmnopqrstuvwxyz012346.abcdefghijklmnopqrstuvwxyz
135 test_match_star_name  1bn     abcdefghijklmnopqrstuvwxyz012346.**     abcdefghijklmnopqrstuvwxyz012346abcdefghijklmnopqrstuvwxyz
136 
137 &- Finally, try overlength names of type two (matches anything).  First,
138 &- try a length of exactly 32, which must be accepted.  Then try longer ones.
139 
140 test_match_star_name  2       **.**.**.**.**.**.**.**.**.**.**        "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
141 test_match_star_name  2b      **.**.**.**.**.**.**.**.**.**.**.**     "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
142 test_match_star_name  2b      *.**.**.**.**.**.**.**.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
143 test_match_star_name  2b      **.*.**.**.**.**.**.**.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
144 test_match_star_name  2b      **.**.*.**.**.**.**.**.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
145 test_match_star_name  2b      **.**.**.*.**.**.**.**.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
146 test_match_star_name  2b      **.**.**.**.*.**.**.**.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
147 test_match_star_name  2b      **.**.**.**.**.*.**.**.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
148 test_match_star_name  2b      **.**.**.**.**.**.*.**.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
149 test_match_star_name  2b      **.**.**.**.**.**.**.*.**.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
150 test_match_star_name  2b      **.**.**.**.**.**.**.**.*.**.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
151 test_match_star_name  2b      **.**.**.**.**.**.**.**.**.*.**.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
152 test_match_star_name  2b      **.**.**.**.**.**.**.**.**.**.*.**      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
153 test_match_star_name  2b      **.**.**.**.**.**.**.**.**.**.**.*      "" x x.x xxx .x. yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
154 
155 &- Now we have an exhaustive check of simple star names which contain
156 &- various reserved characters or sequences.  First, "::", which is
157 &- supposed to be rejected by check_star_name_$entry but otherwise OK.
158 &- This section is contains many test cases which detect all kinds of
159 &- interactions of colons and star name parsing because an earlier
160 &- version of match_star_name_ (never installed) detected double colons
161 &- in the main parser.  When the requirement that the inner loop
162 &- match_star_name_ entrypoint reject "::" was dropped, a simpler
163 &- implementation which has only check_star_name_$entry checking using
164 &- the PL/I index builtin was adopted.  The test cases are retained
165 &- in case they are needed in the future.
166 
167 test_match_star_name  0bbn    ::        foo  ""  .  ..  ...  ::x  x:: x::x
168 test_match_star_name  0bbn    x::       foo  ""  .  ..  ...  ::  ::x  x::x
169 test_match_star_name  0bbn    ::x       foo  ""  .  ..  ...  ::  x::  x::x
170 test_match_star_name  0bn     x::x      foo  ""  .  ..  ...  xx::x xxxx  xx:x x:xx
171 test_match_star_name  1b      *::*      ::  x::  ::x  x::x  xxx::xxx
172 test_match_star_name  1bn     *::*      ""  .  ..  ...  foo  xx  :  x:x:  .::.  x::.  .::x  :x:x  :x:
173 test_match_star_name  1b      ?::?      x::x  ::::
174 test_match_star_name  1bn     ?::?      ""  .  ..  ...  foo  :: x:: ::x  xx::x  x::xx
175 test_match_star_name  1b      ??::??    xx::xx  ::::::
176 test_match_star_name  1bn     ??::??    ""  .  ..  ...  foo  :: x:: ::x  xx::x  x::xx  xxx::xx  xx::xxx
177 test_match_star_name  1b      *::?      ::x  x::x  xx::x  xxx::x  :::  ::::  :::::
178 test_match_star_name  1bn     *::?      ""  .  ..  ...  ::  ::xx  x::  x::xx  xxx::  xxx::xx
179 test_match_star_name  1b      *::??     ::xx  x::xx  xx::xx  xxx::xx  ::::  :::::  ::::::
180 test_match_star_name  1bn     *::??     ""  .  ..  ...  ::  ::x  ::xxx  x::  x::x  x::xxx  xxx::  xxx::x  xxx::xxx
181 test_match_star_name  1b      ?::*      x::  x::x  x::xx  x::xxx  :::  ::::  :::::
182 test_match_star_name  1bn     ?::*      ""  .  ..  ...  ::  xx::  xxx::  xxxx::  ::x  ::xxx  xx::x
183 test_match_star_name  1b      ??::*     xx::  xx::x  xx::xx  xx::xxx  ::::  :::::  ::::::
184 test_match_star_name  1bn     ??::*     ""  .  ..  ...  ::  x::  x::x  xxx::  xxxx::  ::x  ::xxx
185 
186 test_match_star_name  0n      :x:       foo  ""  .  ..  ...  :x:x  x:x: x:x:x
187 test_match_star_name  0n      x:x:      foo  ""  .  ..  ...  :x:  :x:x  x:x:x
188 test_match_star_name  0n      :x:x      foo  ""  .  ..  ...  :x:  x:x:  x:x:x
189 test_match_star_name  0n      x:x:x     foo  ""  .  ..  ...  xx:x:x xxxx  xx:x x:xx
190 test_match_star_name  1       *:x:*     :x:  x:x:  :x:x  x:x:x  xxx:x:xxx
191 test_match_star_name  1n      *:x:*     ""  .  ..  ...  foo  xx  :  .:x:.  x:x:.  .:x:x
192 test_match_star_name  1       ?:x:?     x:x:x
193 test_match_star_name  1n      ?:x:?     ""  .  ..  ...  foo  :x: x:x: :x:x  xx:x:x  x:x:xx
194 
195 &- Now test for pathname delimiters embedded in the star name.  These
196 &- should be rejected by check_star_name_$entry.  They are treated
197 &- specially by check_star_name_$path, in that only the part of the
198 &- name following the last pathname delimiter is checked, and if it is
199 &- null, then zero is returned.  The check_star_name_ and match_star_name_
200 &- entrypoints ignore them.  First, less than:
201 
202 test_match_star_name  0bn     <         foo  ""  .  ..  ...  <x  x< x<x
203 test_match_star_name  0bn     x<        foo  ""  .  ..  ...  <  <x  x<x
204 test_match_star_name  0bn     <x        foo  ""  .  ..  ...  <  x<  x<x
205 test_match_star_name  0bn     x<x       foo  ""  .  ..  ...  xx<x xxxx  xx:x x:xx
206 test_match_star_name  1b      *<*       <  x<  <x  x<x  xxx<xxx
207 test_match_star_name  1bn     *<*       ""  .  ..  ...  foo  xx  :  x:x:  .<.  x<.  .<x  :x:x  :x:
208 test_match_star_name  1b      ?<?       x<x
209 test_match_star_name  1bn     ?<?       ""  .  ..  ...  foo  < x< <x  xx<x  x<xx
210 test_match_star_name  1b0     *<x       <x  foo<x
211 test_match_star_name  1b0n    *<x       ""  <  x<  <xx  xx<xx  foo
212 test_match_star_name  bb0     (***<  <***<xxx  *.***<x.x)
213 test_match_star_name  bb1     (***<*  <***<*.*  *.***<**foo)
214 test_match_star_name  1b2     *<**      <foo.bar  foo<bar  <
215 test_match_star_name  1b2n    *<**      ""  foo.bar  foo.bar<quux  xxx  .  .<
216 test_match_star_name  bb2     (***<**  ***<*.**  *.***.*<**.*  *.**.***<**.**)
217 
218 &- Now test greater than.
219 
220 test_match_star_name  0bn     >         foo  ""  .  ..  ...  >x  x> x>x
221 test_match_star_name  0bn     x>        foo  ""  .  ..  ...  >  >x  x>x
222 test_match_star_name  0bn     >x        foo  ""  .  ..  ...  >  x>  x>x
223 test_match_star_name  0bn     x>x       foo  ""  .  ..  ...  xx>x xxxx  xx:x x:xx
224 test_match_star_name  1b      *>*       >  x>  >x  x>x  xxx>xxx
225 test_match_star_name  1bn     *>*       ""  .  ..  ...  foo  xx  :  x:x:  .>.  x>.  .>x  :x:x  :x:
226 test_match_star_name  1b      ?>?       x>x
227 test_match_star_name  1bn     ?>?       ""  .  ..  ...  foo  > x> >x  xx>x  x>xx
228 test_match_star_name  bb0     (***>  >***>xxx  *.***>x.x)
229 test_match_star_name  bb1     (***>*  >***>*.*  *.***>**foo)
230 test_match_star_name  1b2     *>**      >foo.bar  foo>bar  >
231 test_match_star_name  1b2n    *>**      ""  foo.bar  foo.bar>quux  xxx  .  .>
232 test_match_star_name  bb2     (***>**  ***>*.**  *.***.*>**.*  *.**.***>**.**)
233 
234 &- Now test both together:
235 
236 test_match_star_name  0bn     <foo>     ""  .  ..  foo
237 test_match_star_name  0bn     <<a>b     ""  .  ..  a  b
238 test_match_star_name  1b      <a>*      <a>foo
239 test_match_star_name  1bn     <a>*      ""  .  ..  a  foo
240 test_match_star_name  1b0n    <*>a      <.>a
241 
242 &- The entrypoints for validating file system names, check_star_name_$entry
243 &- and check_star_name_$path, must reject names which contain null components.
244 &- The more general entrypoints ignore null components.
245 &- Here we give that feature a systematic workout.  First, constants.
246 
247 test_match_star_name  0bbn    ""        .  ?  *  x  xx  ??  xxx  x.x  .x  x.  x.x  x.x.  x.x.  x..x
248 test_match_star_name  0bbn    .x        ""  .  x.x  ..x  x..  xx  x  x.x.x.x  x.x.x.  .x.x.x
249 test_match_star_name  0bbn    .x.x.x    ""  .  x.x  ..x  x..  xx  x  x.x.x.x  x.x.x.
250 test_match_star_name  0bbn    x.        ""  .  x.x  ..x  x..  xx  x  x.x.x.x  x.x.x.  .x.x.x
251 test_match_star_name  0bbn    x.x.x.    ""  .  x.x  ..x  x..  xx  x  x.x.x.x  .x.x.x
252 test_match_star_name  0bbn    x..x      ""  .  x.x  ..x  x..  xx  x  x.x.x.x  x.x.x.  .x.x.x
253 test_match_star_name  0bbn    .         ""  ..  x.x  ..x  x..  xx  x  x.x.x.x  x.x.x.  .x.x.x
254 test_match_star_name  0bbn    ..        ""  .  ...  x.x  ..x  x..  xx  x  x.x.x.x  x.x.x.  .x.x.x
255 test_match_star_name  0bbn    x..       ""  ...  x.x.x  x.x.  x..x  .x.x  ..x
256 test_match_star_name  0bbn    ..x       ""  ...  x.x.x  x.x.  x..x  .x.x  x..
257 
258 &- We test the legality and type checking for null components in names
259 &- which contain stars.  Later we will test matching, but for now I have
260 &- thrown in a couple of cases where the match must be successful.
261 
262 test_match_star_name  1bb     (.*  .*.  .*.*  .*.*.  .*.*.*  .*.*.*.  .*.*.*.*  .*.*.*.*.  .*.*.*.*.*)
263 test_match_star_name  1bb     (*.  *.*.  *.*.*.  *.*.*.*.  *.*.*.*.*.)
264 test_match_star_name  1bb     (.**  .**.**  .**.**.**  .**.**.**.**)  ""
265 test_match_star_name  1bb     (.**.  .**.*  .**.**.  .**.**.*  .**.**.**.  .**.**.**.*  .**.**.**.**.)
266 test_match_star_name  1bb     (**.  **.*.  **.*.*.  **.*.*.*.  **.*.*.*.*.)
267 test_match_star_name  1bb     (*.**.  *.*.**.  *.*.*.**.  *.*.*.*.**.  *.**.*.  *.*.**.*.  *.*.**.*.*.)
268 test_match_star_name  1bb     (**.**.  **.**.**.  **.**.**.**.  **.**.**.**.**.)  ""
269 test_match_star_name  1bb     (.*.**  .*.*.**  .*.*.*.**  .*.*.*.*.**  .*.**.*  .*.**.*.*  .*.**.*.*.*  .*.*.**.*  .*.*.*.**.*  .*.*.**.*)
270 
271 test_match_star_name  1bb     (*..*  **..*  *..**  **..**  *.*..*  *..*.*  **..*.*  **..**.*  *.*..*)
272 test_match_star_name  1bb     (**.*..*  *.*..**  *.**..*  **.*..**)
273 
274 test_match_star_name  1bb     (*...*  **...*  *...**  **...**  *.*...*  *.**...*  **.*...*  **.**...*)
275 test_match_star_name  1bb     (*.*...**  *.**...**  **.*...**  **.**...**  .*.*...*  *.*...*.)
276 
277 &- We now know that type 0 and type 2 star names work, and we have already
278 &- tested several other constructs in passing, but now we exhaustively test
279 &- all the comparison routines.  First we test routines which handle the END
280 &- (i.e., terminal comparison) of a type one star name without a terminal
281 &- literal (i.e., the final character must be star or query).
282 
283 test_match_star_name  1       ?         x  *
284 test_match_star_name  1n      ?         ""  .  ..  ...  xx  x.x  .x  x.  ??  **  ?*  *?  ?.?  ?.*  *.?  *.*
285 
286 test_match_star_name  1       ??        xx  **  xy  ?x  x?
287 test_match_star_name  1n      ??        ""  .  ..  ...  x  x.x  x..x  xxx  xxxxxxx  xx.x  x.xx
288 
289 test_match_star_name  1       *         ""  x  xx  xxx  ?  ??  *  **  xxxxxxxxxx
290 test_match_star_name  1n      *         .  ..  ...  x.x  x.x.x  x..x  .x  x.  xxx.  xxx.x
291 
292 test_match_star_name  1bb     *.        .  foo.  ?.  foobarbazquux.
293 test_match_star_name  1bbn    *.        ""  xxx  .foo  foo.bar  foo.bar.  .foo.  ..  ...
294 
295 test_match_star_name  1       *.*       .  foo.  .bar  foo.bar
296 test_match_star_name  1n      *.*       ""  xxx  foo.bar.  .foo.  ..  ...
297 
298 test_match_star_name  1       *.*.*     ..  foo..  .bar.  ..quux  foo.bar.  foo..quux  .bar.quux  foo.bar.quux
299 test_match_star_name  1n      *.*.*     ""  .  ...  foo  foo.bar  foo.bar.baz.quux  foo..bar.baz  "this is a.test"
300 
301 test_match_star_name  1bb     *.**.     .  foo.  foo.bar.  foo..  foo.bar.baz.  *.*.
302 test_match_star_name  1bbn    *.**.     ""  .foo  foo.bar  foo.bar.baz  foo..baz  *.*  *.*.*
303 
304 test_match_star_name  1bb     **.*.     .  foo.  foo.bar.  foo..  foo.bar.baz.  *.*.
305 test_match_star_name  1bbn    **.*.     ""  .foo  foo.bar  foo.bar.baz  foo..baz  *.*  *.*.*
306 
307 test_match_star_name  1       *.**.*    .  ..  ...  foo.bar  foo.  .bar  foo.bar.baz  foo.bar.baz.quux
308 test_match_star_name  1n      *.**.*    ""  foo  "this is a test"
309 
310 test_match_star_name  1bb     **.       ""  .  foo.  foo.bar.  foo.bar.baz.  foo..
311 test_match_star_name  1bbn    **.       x  .foo  foo.bar  foo.bar.bax  foo..bar  ...foo
312 
313 test_match_star_name  1       **.?      x  foo.x  foo.bar.x  .x  ..x
314 test_match_star_name  1n      **.?      ""  .  ...  xx  .xx  ..xx  xxx  foo.bar
315 
316 test_match_star_name  1       **.??     xx  foo.xx  foo.bar.xx  .xx  ..xx
317 test_match_star_name  1n      **.??     ""  .  ..  ...  ....  x  foo  foo.x  foo.bar
318 
319 test_match_star_name  1       **?       x  xx  xxx  xxxxxxxx  .x  .xxx  foo.x
320 test_match_star_name  1n      **?       ""  x.  foo.  foo.bar.  .  ..  ...
321 
322 test_match_star_name  1       **??      xx  xxx  xxxx  foo.xx  x.xx  x.x.x.xxx
323 test_match_star_name  1n      **??      ""  x  foo.x  foo.bar.bax.x  .  ..  ...  ....
324 
325 test_match_star_name  1       **?*      x  xx  xxx  xxxxxxxx  .x  .xxx  foo.x
326 test_match_star_name  1n      **?*      ""  x.  foo.  foo.bar.  .  ..  ...
327 
328 test_match_star_name  1       **??*     xx  xxx  xxxx  foo.xx  x.xx  x.x.x.xxx
329 test_match_star_name  1n      **??*     ""  x  foo.x  foo.bar.bax.x  .  ..  ...  ....
330 
331 test_match_star_name  1       **?*?     xx  xxx  xxxx  foo.xx  x.xx  x.x.x.xxx
332 test_match_star_name  1n      **?*?     ""  x  foo.x  foo.bar.bax.x  .  ..  ...  ....
333 
334 test_match_star_name  1       **?**     x  x.  .x  .x.  x.x  foo.bar
335 test_match_star_name  1n      **?**     ""  .  ..  ...  ....
336 
337 test_match_star_name  1       **??**    xx  x.xx  xx.x  .xx.  foo.bar
338 test_match_star_name  1n      **??**    ""  .  ..  ...  ....  x  x.x  x.x.x.x  x.x.  .x  x.  .x.  .x.x
339 
340 test_match_star_name  1       **?**?**  x.x  xx  xx.x  x.xx  xxx
341 test_match_star_name  1n      **?**?**  ""  .  ..  ...  ....  x  .x  x.  x..  ..x  .x.
342 
343 test_match_star_name  1       *?        x  xx  xxxx
344 test_match_star_name  1n      *?        ""  .x  x.  x.x  x.x.x  .  ..  ...
345 
346 test_match_star_name  1       ?*        x  xx  xxxx
347 test_match_star_name  1n      ?*        ""  .x  x.  x.x  x.x.x  .  ..  ...
348 
349 test_match_star_name  1       *?*       x  xx  xxxx
350 test_match_star_name  1n      *?*       ""  .x  x.  x.x  x.x.x  .  ..  ...
351 
352 test_match_star_name  1       *??       xx  xxx  xxxx
353 test_match_star_name  1n      *??       ""  x  .x  x.  x.x  .x.  .  ...  .xx  x.xx  xx.x
354 
355 test_match_star_name  1       ?*?       xx  xxx  xxxx
356 test_match_star_name  1n      ?*?       ""  x  .x  x.  x.x  .x.  .  ...  .xx  x.xx  xx.x
357 
358 test_match_star_name  1       *??*      xx  xxx  xxxx
359 test_match_star_name  1n      *??*      ""  x  .x  x.  x.x  .x.  .  ...  .xx  x.xx  xx.x
360 
361 &- That's all the terminal comparison routines which don't involve terminal
362 &- literals.  They follow.
363 
364 test_match_star_name  1       *foo      foo  xfoo  xxfoo  xxxxxxxxxxfoo  foofoofoofoo
365 test_match_star_name  1n      *foo      fo  foof  fooo  foo.foo  xxfoo.  .  ..  ...  ""
366 
367 test_match_star_name  1       *.foo     .foo foo.foo  bar.foo
368 test_match_star_name  1n      *.foo     foo  xfoo  xxfoo  foo.foo.foo  foo.fo
369 
370 test_match_star_name  1       *.*foo    .foo  foo.foo  foo.foofoo  xfoo.xfoo
371 test_match_star_name  1n      *.*foo    foo  ""  .  ..  ...  foo.  foo.foo.  a.b.foo
372 
373 test_match_star_name  1       *.**foo   .foo  .xxxfoo  bar.foo  z.c.x.foo  x.xxxfoo  xxxx.xxx.xfoo
374 test_match_star_name  1n      *.**foo   foo  ""  .  ..  ...  foo.bar  foo.fo  foo.foo.  foo.foo.fo
375 
376 test_match_star_name  1       **.*foo   foo  xfoo  .foo  bar.foo  bar.xxxfoo  x.y.z.foo  xy.zfoo
377 test_match_star_name  1n      **.*foo   foox  ""  .  ..  ...  foo.  foo.bar  x.y.z
378 
379 test_match_star_name  1       *.**.foo  .foo  ..foo  ...foo  bar.baz.quux.foo  foo.xfoo.foo
380 test_match_star_name  1n      *.**.foo  ""  .  ..  ...  foo  foo.  .foo.  foo.bar  .xfoo  .xxfoo  foo.xfoo.xxfoo
381 
382 test_match_star_name  1       **.*.foo  .foo  ..foo  ...foo  bar.baz.quux.foo  foo.xfoo.foo
383 test_match_star_name  1n      **.*.foo  ""  .  ..  ...  foo  foo.  .foo.  foo.bar  .xfoo  .xxfoo  foo.xfoo.xxfoo
384 
385 test_match_star_name  1       **foo     foo  xfoo  .foo  bar.foo  bar.xxxfoo  x.y.z.foo  xy.zfoo
386 test_match_star_name  1n      **foo     foox  ""  .  ..  ...  foo.  foo.bar  x.y.z
387 
388 test_match_star_name  1       **.foo    foo  .foo  ..foo  bar.foo  foo.foo
389 test_match_star_name  1n      **.foo    barfoo  x.barfoo  ""  .  ..  ...
390 
391 test_match_star_name  1       **.?foo   xfoo  x.xfoo  foo.xfoo
392 test_match_star_name  1n      **.?foo   foo  foo.foo  xxfoo  foo.xxfoo  ""  .  ..  ...
393 
394 test_match_star_name  1       **?foo    xfoo  xxfoo x.xfoo
395 test_match_star_name  1n      **?foo    foo  x.foo  xfoo.  xfoo.foo  ""  .  ..  ...
396 
397 test_match_star_name  1       *?foo     xfoo  xxfoo  xxxfoo
398 test_match_star_name  1n      *?foo     foo  xxx  foo.  x.foo  x.x  ""  .  ..  ...
399 
400 test_match_star_name  1       ??*foo    xxfoo  xxxfoo
401 test_match_star_name  1n      ??*foo    foo  xfoo  xxx  foo.  x.foo  x.x  ""  .  ..  ...
402 
403 test_match_star_name  1       ???foo    foofoo  xxxfoo
404 test_match_star_name  1n      ???foo    foo  xfoo  xxfoo  xxxxfoo  xxxxxfoo  foofofoo  x.foo  x..foo  ""  .  ..  ...
405 
406 &- Now we test some simple null component cases.
407 
408 test_match_star_name  1bb     .*        .  .foo
409 test_match_star_name  1bbn    .*        ""  ..  ...  foo.  .foo.  foo.bar
410 
411 test_match_star_name  1bb     .*?       .x  .foo
412 test_match_star_name  1bbn    .*?       ""  .  ..  ...  foo.  foo.bar  foo
413 
414 test_match_star_name  1bb     .*foo     .foo  .xfoo  .xxxfoo
415 test_match_star_name  1bbn    .*foo     ""  .  ..  ...  foo  foo.  foo.bar  foo.foo.
416 
417 test_match_star_name  1bb     .**       .  ..  ...  ""  .foo  .foo.bar  .foo.
418 test_match_star_name  1bbn    .**       foo  foo.bar  foo.  foo..bar
419 
420 test_match_star_name  1bb     .**.      .  ..  ...  .foo.  .foo.bar.
421 test_match_star_name  1bbn    .**.      ""  foo  foo.bar  foo.  .bar  foo..bar
422 
423 test_match_star_name  1bb     .**?      .x  .x.x.x.x.x  ......x  .foo.bar
424 test_match_star_name  1bbn    .**?      ""  .  ..  ...  foo  foo.bar  foo..bar  .foo.
425 
426 test_match_star_name  1bb     .**foo    .foo  .xfoo .x.foo .x.xfoo
427 test_match_star_name  1bbn    .**foo    foo  foo.foo  foo..foo  foo.
428 
429 &- The number of singlestar components is not supposed to matter,
430 &- but depending on the order in which they are encountered,
431 &- differing amounts of state are stashed away.
432 
433 test_match_star_name  1       *.*.**    .  ..  ...  x.x  x.  .x  x.x.x  x.x.x.x.x
434 test_match_star_name  1n      *.*.**    ""  foo
435 
436 test_match_star_name  1       *.*.**.*  ..  ...  x.x.x  x.x.  x..x  .x.x  x..  .x.  ..x  foo.bar.baz.quux
437 test_match_star_name  1n      *.*.**.*  ""  .  foo  foo.bar  .foo  bar.
438 
439 test_match_star_name  1       *.*.*.**  ..  ...  x.x.x  x.x.  x..x  .x.x  x..  .x.  ..x  foo.bar.baz.quux
440 test_match_star_name  1n      *.*.*.**  ""  .  foo  foo.bar  .foo  bar.
441 
442 test_match_star_name  1bbn    *.*.      ""  .  a.b.c  ..c  a.b.c.  a.b.c.d
443 test_match_star_name  1bbn    *.**.*.   ""  .  a.b  .b  a.b.c  .b.c  ..c  a.b.c.d  ...d
444 test_match_star_name  1bbn    *.*.**.   ""  .  a.b  .b  a.b.c  .b.c  ..c  a.b.c.d  ...d
445 
446 test_match_star_name  1       *.?       .x  x.x  xx.x  xxx.x
447 test_match_star_name  1n      *.?       ""  .  ..  ...  foo  foo.  foo.fo  foo.bar.x
448 
449 test_match_star_name  1       *.*?      .x  .xx  x.x  x.xx  xx.x  xx.xx
450 test_match_star_name  1n      *.*?      ""  .  ..  ...  foo  foo.  foo.bar.x
451 
452 test_match_star_name  1       *.**.*?   .x  .xx  x.x  x.xx  xx.x  xx.xx  x.x.x  x..x  ..x  x.x.x.xx
453 test_match_star_name  1n      *.**.*?   ""  .  ..  ...  ....  foo  foo.  foo.bar.  bar.foo.baz.
454 
455 test_match_star_name  1       *.*.**?   ..x  ...x  ....x  x.x.x  x.x.xx  x.x.x.x
456 test_match_star_name  1n      *.*.**?   ""  .  ..  ...  ....  foo  foo.bar  foo.x  foo.bar.  foo.bar.baz.
457 
458 test_match_star_name  1       *.**.?    .x  ..x  ...x  x.x  xx.x  xx.xx.x
459 test_match_star_name  1n      *.**.?    ""  .  ..  ...  ....  x.  x.xx  x.x.  x.x.xx  x.x.x.  x.x.x.xx
460 
461 test_match_star_name  1       **.*.?    .x  ..x  ...x  x.x  xx.x  xx.xx.x
462 test_match_star_name  1n      **.*.?    ""  .  ..  ...  ....  x.  x.xx  x.x.  x.x.xx  x.x.x.  x.x.x.xx
463 
464 test_match_star_name  1       *.**?     .x  ..x  ...x  x.x  x.xx  x.xxx  x.x.xxx
465 test_match_star_name  1n      *.**?     ""  .  ..  ...  ....  x.  x.x.  x.x.x.  x.x.x.x.
466 
467 test_match_star_name  1       ?**?      xx  x.x  x.x.x  x..x
468 test_match_star_name  1n      ?**?      ""  .  ..  ...  ....  .....  x  x.  .x  .x.  x..  ..x  x...  x.x.  xx.  .x.x  .xx
469 
470 test_match_star_name  1       **foo?    foo1  xfoo1  x.foo1  x.xfoo1
471 test_match_star_name  1n      **foo?    foo  fooxx  xfoo  xfooxx  x.foo  x.fooxx  x.xfoo  x.xfooxx
472 
473 test_match_star_name  1       **.foo?   foo1  x.foo1  x.x.foo1  foo.foo1  foo.foo.foo1
474 test_match_star_name  1n      **.foo?   foo  xfoo  xfoox  fooxx  foo.foo.foo  foo.foo.fooxx  foo.xfoox  ""  .  ..  ...
475 
476 test_match_star_name  1bb     **..?     .x  ....x  foo..x
477 test_match_star_name  1bbn    **..?     ""  .  ..  ...  .xx  x.xx  x.  x.x.  x.x.xx  foo.x
478 
479 test_match_star_name  1bb     **..*     .  .foo  ..  ..xxx  .....xx  foo..x  x..x  foo..
480 test_match_star_name  1bbn    **..*     ""  foo  foo.bar  foo.  foo.bar.
481 
482 &- Now that all terminal comparison routines have been tortured,
483 &- We are going to try all the hairy nonterminal comparisons.
484 
485 test_match_star_name  1       **.?o?o   oooo  oooo.oooo  .oooo  .xoxo  ooo.oooo  o.o.oooo
486 test_match_star_name  1n      **.?o?o   ooo  ooooo  oooo.ooo  oooo.ooooo
487 
488 test_match_star_name  1       **.?o.*o  oo.o  o.oo.oo  o.xo.xo
489 test_match_star_name  1n      **.?o.*o  o.oo  xo.ox  o.o.oo
490 
491 test_match_star_name  1       **.?.*o   x.o  o.o  oo.o.oo  xx.x.xo
492 test_match_star_name  1n      **.?.*o   o  oo.o  o.oo.o  o..o
493 
494 test_match_star_name  1       **?o?o    oooo  xoxo  xxoxo  x.x.xoxo  x.x.oooo  ooooo  oxxxooo
495 test_match_star_name  1n      **?o?o    ooo  ooxxo  oooox  x.x.xoox
496 
497 test_match_star_name  1       **?o.*o   oo.o  oo.oo  xo.xo  xxxo.o  xxxxo.ooo
498 test_match_star_name  1n      **?o.*o   o.o  o  oo  oo.x  oo.xx.o
499 
500 test_match_star_name  1       **.o?o    ooo  .ooo  x.ooo  ooo.ooo  ooo.oxo
501 test_match_star_name  1n      **.o?o    ooo.xxx  xxx  oox  xoo  xox  oo  oooo
502 
503 test_match_star_name  1       **.o.*o   o.o  o.xo  x.o.o  o.o.o.o.x.o.xo
504 test_match_star_name  1n      **.o.*o   o.o.o.o.x.o  o  oo  x.o.x  x.x.ooo  o.o.x.o
505 
506 test_match_star_name  1       **o?o     ooo  oxo  xoxo  oooooo  oxoxoxoxoxo
507 test_match_star_name  1n      **o?o     oo  xoo  oox  xox  oooooox  oooooooxxo
508 
509 test_match_star_name  1       **o.*o    o.o  xxxxxxxo.o    o.o.o.o.o.o  o.o.o.o.o.xxo
510 test_match_star_name  1n      **o.*o    o  o.o.o.o.x  o.o.o.o.oooox  o.o.oox.o
511 
512 test_match_star_name  1       *.**.o?o  foo.ooo  .oxo
513 test_match_star_name  1n      *.**.o?o  oxo  ooo  ooo.xoo  ooo.oox  ooo.ooo.ooo.o
514 
515 test_match_star_name  1       *.**.o.*o foo.o.o  .o.o.xo
516 test_match_star_name  1n      *.**.o.*o o  o.o  o.oo.o
517 
518 test_match_star_name  1       *.**o?o   foo.ooo  oooo.ooooo
519 test_match_star_name  1n      *.**o?o   ooo  ooooo  oooo.oo  ooo.xoo
520 
521 test_match_star_name  1       *.**o.*o  foo.o.o  .o.ooo.oo.o
522 test_match_star_name  1n      *.**o.*o  o  o.o  o.x.o  o.o.ox  o.ox.o
523 
524 test_match_star_name  1       ?o.*o     oo.o  oo.xo  xo.xxo  xo.oo
525 test_match_star_name  1n      ?o.*o     o.o  ooo  ox.o  oo.x
526 
527 test_match_star_name  1       *.o.*o    x.o.o  o.o.xo
528 test_match_star_name  1n      *.o.*o    oo  o.o  o.o.x.o
529 
530 test_match_star_name  1       o.*o      o.o  o.ooooooo
531 test_match_star_name  1n      o.*o      o  oo  o.ox
532 
533 test_match_star_name  1       o.*o?o    o.ooo  o.oooooxo
534 test_match_star_name  1n      o.*o?o    ooo  oo.ooo  o.oxxo
535 
536 test_match_star_name  1       o.*.o?o   o..ooo  o.oooo.ooo  o.o.oxo
537 test_match_star_name  1n      o.*.o?o   x..ooo  o.oooo  o.oooo.xoo  ooo  o.ooo
538 
539 test_match_star_name  1       o.*o.?o   o.ffo.oo
540 test_match_star_name  1n      o.*o.?o   o..o.oo  o..oo  oo.o.oo  o.o.o  o.o.ooo  o.oo  o.o.o.oo
541 
542 test_match_star_name  1       o.*o.o?o  o.o.oxo  o.ooo.oxo
543 test_match_star_name  1n      o.*o.o?o  oo.o.oxo  o..oxo  o.o.oo  o.o.oooo  o.o.o.ooo  o.ooo
544 
545 test_match_star_name  1       o.*o.*o   o.o.o  o.xxxxo.o  o.o.xxxxo  o.xxxxo.xxxxo
546 test_match_star_name  1n      o.*o.*o   o..  o..o  o.o.  oo.o.o  o.x.o  o.o.x  o.ox.o  o.o.ox
547 
548 test_match_star_name  1       o.*.o.*o  o..o.o  o.xxx.o.xxxo
549 test_match_star_name  1n      o.*.o.*o  .o.o.o  o...o  o...o.o  o.o.o.  o.o.o.o.  o.o.o.ox
550 
551 test_match_star_name  1       o.*o.o.*o           o.o.o.o  o.xxxo.o.xxxo
552 test_match_star_name  1n      o.*o.o.*o           o..o.o  o.o.o.  o.o.o.ox  .o.o.o  o.o..o
553 
554 test_match_star_name  1       ?*o?o     xoxo  xxoxo
555 test_match_star_name  1n      ?*o?o     oxox  oxxo  xoox  x.oxo  .oxo  xo.o
556 
557 test_match_star_name  1       ?*o.?o    xo.xo  xxxxo.xo
558 test_match_star_name  1n      ?*o.?o    o.xo  xo.o  xoxo  xoxxo  .o.o  o.o.o
559 
560 test_match_star_name  1       ?*.o?o    x.oxo  oxo.oxo
561 test_match_star_name  1n      ?*.o?o    oxo.xox  oxo.xxo  oxo.oxx  xoxo  xxoxo  x.xoxo x.x.oxo
562 
563 test_match_star_name  1       ?*o.o?o   xo.oxo  xxxxxo.oxo
564 test_match_star_name  1n      ?*o.o?o   o.oxo  oo.oo  oo.xxo  oo.oxx
565 
566 test_match_star_name  1       ?*o.*o    xo.o   xxxxxxo.o  xo.xxxxxxo  xxxxxxo.xxxxxxxxo
567 test_match_star_name  1n      ?*o.*o    o.o  o.o.o  .o.o  oo.x  oo.ox  o.  .o
568 
569 test_match_star_name  1       ?*.o.*o   x.o.o  xxxx.o.o  x.o.xxxxo
570 test_match_star_name  1n      ?*.o.*o   ""  .  ..  ...  ooooo  .o.o  o.o.  o.o  o.o.o.o  o.o.ox
571 
572 test_match_star_name  1       ?*o.o.*o  xo.o.o  oooo.o.o  ooo.o.xxxo
573 test_match_star_name  1n      ?*o.o.*o  ""  .  ..  ...  oooooo  oo.o  oo.o.  oo.o.x  ox.o.o  oo.o.ox  oo.o.o.o
574 
575 test_match_star_name  1       *.*o?o    .ooo  xxx.oxo
576 test_match_star_name  1n      *.*o?o    ""  .  ..  ...  oooo  ..ooo  o.oox  o.xoo
577 
578 test_match_star_name  1       *.*o.?o   o.o.oo  .o.xo  xxx.xxo.oo  xxx.ooo.xo
579 test_match_star_name  1n      *.*o.?o   ""  .  ..  ...  ooooo  o.o  o.o.o  o.o.ooo  o.ox.oo  o.o.ox
580 
581 test_match_star_name  1       *.*.o?o   ..ooo  ..oxo  o.o.ooo  xxx.xxx.oxo
582 test_match_star_name  1n      *.*.o?o   ""  .  ..  ...  oooo  o.o  o.oooo  o.o.o.ooo  o.o.oox  o.o.xoo
583 
584 test_match_star_name  1       *.*o.o?o  .o.ooo  o.o.oxo  o.xxxo.ooo  xxx.ooo.oxo
585 test_match_star_name  1n      *.*o.o?o  ""  .  ..  ...  .ooooo  .ox.ooo  .o.oox  .o.xoo  o..ooo
586 
587 test_match_star_name  1       *.*o.*o   .o.o  xxx.ooo.ooo  o.xxo.oxo
588 test_match_star_name  1n      *.*o.*o   ""  .  ..  ...  ooooo  o.o  o.o.o.o  o.ox.o  o.o.ox
589 
590 test_match_star_name  1       *.*.o.*o  ..o.o  xxx.xxx.o.xxxo
591 test_match_star_name  1n      *.*.o.*o  ""  .  ..  ...  ooooo  o.o.oo.o  o.o.o.ox
592 
593 test_match_star_name  1       *.*o.o.*o           .o.o.o  o.o.o.oo  x.xo.o.xo  ooo.oo.o.xo
594 test_match_star_name  1n      *.*o.o.*o           ""  .  ..  ...  oooo  o.o.o  o.o.o.o.o  o.o.o.ox  o.ox.o.o
595 
596 test_match_star_name  1       *o?o      oxo  ooooooo  oooooooxo  xxxxxxxoxo  xxxxxxxooo   xxxxxxoooo
597 test_match_star_name  1n      *o?o      ""  .  ..  ...  oo  oox  xoo  oooooox  oooooxoo  o.o  ooo.  .ooo
598 
599 test_match_star_name  1       *o?o.o    oxo.o  ooooooo.o  oooooooxo.o  xxxxxxxoxo.o  xxxxxxxooo.o   xxxxxxoooo.o
600 test_match_star_name  1n      *o?o.o    ""  .  ..  ...  oo.o  oox.o  xoo.o  oooooox.o  oooooxoo.o  o.o  ooo.  .o  oxo.ooo
601 
602 test_match_star_name  1       *o.?o     o.xo  xxxxxo.oo
603 test_match_star_name  1n      *o.?o     ""  .  ..  ...  o  ooo  ooooo  o.o  o.ooo  o.ox  .oo  o.
604 
605 test_match_star_name  1       *.o?o     o.oxo  .ooo  xxxxx.ooo
606 test_match_star_name  1n      *.o?o     ""  .  ..  ...  o  ooo  ooooo  o.oo  o.oooo  oooo.oo
607 
608 test_match_star_name  1       *o.o?o    o.ooo  ooo.oxo  xxxo.oxo
609 test_match_star_name  1n      *o.o?o    ""  .  ..  ...  o  ooo  ooooo  o.oo  o.oooo  oooo.oo
610 
611 test_match_star_name  1       *o.*o     o.o  oooo.oooo  xxxxo.o   o.xxxxo
612 test_match_star_name  1n      *o.*o     ""  .  ..  ...  o  o.o.o  o.  .o  ox.o  o.ox
613 
614 test_match_star_name  1       *.o.*o    .o.o  o.o.o  x.o.xxxxxo   xxxx.o.ooooo
615 test_match_star_name  1n      *.o.*o    ""  .  ..  ...  o  o.o  o.o.o.o  o.o.  o.o.ox
616 
617 test_match_star_name  1       *o.o.*o   o.o.o  xxxxo.o.o  ooooo.o.ooooo  o.o.xxxxxo
618 test_match_star_name  1n      *o.o.*o   ""  .  ..  ...  o  o.o  o.o.o.o  ox.o.o  o.o.ox  .o.o  o.o.
619 
620 test_match_star_name  1       o.**.*o   o.o  o.oooo  o.xxxo  o.xxx.o  o.ooo.ooo  o....o
621 test_match_star_name  1n      o.**.*o   ""  .  ..  ...  o  oo  ooo  x.o  o.x  o.ox  oo.o
622 
623 test_match_star_name  1       o.*?o?o   o.xoxo  o.oooo  o.xxxoxo  o.ooooooooooo
624 test_match_star_name  1n      o.*?o?o   ""  .  ..  ...  .xoxo  x.oooo  o.ooo  o.o.oooo  o.x.xoxo
625 
626 test_match_star_name  1       o.*.*o    o.o.o  o..o  o..xxxxxxo  o.xxxxxx.o  o.xxxx.xxxxo
627 test_match_star_name  1n      o.*.*o    ""  .  ..  ...  .x.o  ..o  o..  x..o  x..ox  o.o  o.o.o.o
628 
629 &- And now a few others that are expected to be commonly used but which
630 &- didn't fall into the crude categories above.
631 
632 test_match_star_name  1       foo**bar  foobar  foo.bar  foobarbar  foofoobar  foofoobarbar
633 test_match_star_name  1n      foo**bar  ""  foo  bar  foo.ar  foo?ar  fobbar  foobarx
634 
635 test_match_star_name  1       foo**.bar           foo.bar  foo.bar.bar  foo..bar
636 test_match_star_name  1n      foo**.bar           ""  foobar  bar  .bar  foo.foobar
637 
638 test_match_star_name  1       foo.**bar           foo.bar  foo.foobar  foo.bar.bar
639 test_match_star_name  1n      foo.**bar           ""  foobar  foobar.bar  foo.  bar
640 
641 test_match_star_name  1       foo.**.bar          foo.bar  foo.quux.bar  foo..bar  foo...bar
642 test_match_star_name  1n      foo.**.bar          foobar  foo.  .bar  foo.foobar  foobar.bar
643 
644 test_match_star_name  1       *a?a.*    aaa.a  aaaaaaaaaa.a  xxxxxxxaxa.  axa.xxxxxxx
645 test_match_star_name  1n      *a?a.*    ""  .  ..  ...  aaa  .aaa  aa.  aax.a  aaaaa  aaa.a.a
646 
647 & Now test the various selectable syntax checks that check_star_name_
648 & can do.
649 
650 test_check_star_name  ::        ""  0  archive_pathname
651 test_check_star_name  ::bar     ""  0  archive_pathname
652 test_check_star_name  ::*       ""  0  archive_pathname
653 test_check_star_name  foo::     ""  0  archive_pathname
654 test_check_star_name  **::      ""  0  archive_pathname
655 test_check_star_name  foo::bar  ""  0  archive_pathname
656 test_check_star_name  foo::**   ""  0  archive_pathname
657 test_check_star_name  **::bar   ""  0  archive_pathname
658 test_check_star_name  **::**    ""  0  archive_pathname
659 
660 test_check_star_name  ::        ignore_archive  0  0
661 test_check_star_name  ::bar     ignore_archive  0  0
662 test_check_star_name  ::**      ignore_archive  1  0
663 test_check_star_name  foo::     ignore_archive  0  0
664 test_check_star_name  **::      ignore_archive  1  0
665 test_check_star_name  foo::bar  ignore_archive  0  0
666 test_check_star_name  foo::**   ignore_archive  1  0
667 test_check_star_name  **::bar   ignore_archive  1  0
668 test_check_star_name  **::**    ignore_archive  1  0
669 
670 test_check_star_name  ::        process_archive  0  null_name_component
671 test_check_star_name  ::bar     process_archive  0  null_name_component
672 test_check_star_name  ::**      process_archive  0  null_name_component
673 test_check_star_name  foo::     process_archive  0  bad_file_name
674 test_check_star_name  **::      process_archive  0  bad_file_name
675 test_check_star_name  foo::bar  process_archive  0  0
676 test_check_star_name  foo::**   process_archive  1  0
677 test_check_star_name  **::bar   process_archive  1  0
678 test_check_star_name  **::**    process_archive  1  0
679 
680 test_check_star_name  $        ""  0  bad_file_name
681 test_check_star_name  $bar     ""  0  bad_file_name
682 test_check_star_name  $*       ""  0  bad_file_name
683 test_check_star_name  foo$     ""  0  bad_file_name
684 test_check_star_name  **$      ""  0  bad_file_name
685 test_check_star_name  foo$bar  ""  0  bad_file_name
686 test_check_star_name  foo$**   ""  0  bad_file_name
687 test_check_star_name  **$bar   ""  0  bad_file_name
688 test_check_star_name  **$**    ""  0  bad_file_name
689 
690 test_check_star_name  $        ignore_entrypoint  0  0
691 test_check_star_name  $bar     ignore_entrypoint  0  0
692 test_check_star_name  $**      ignore_entrypoint  1  0
693 test_check_star_name  foo$     ignore_entrypoint  0  0
694 test_check_star_name  **$      ignore_entrypoint  1  0
695 test_check_star_name  foo$bar  ignore_entrypoint  0  0
696 test_check_star_name  foo$**   ignore_entrypoint  1  0
697 test_check_star_name  **$bar   ignore_entrypoint  1  0
698 test_check_star_name  **$**    ignore_entrypoint  1  0
699 
700 test_check_star_name  $        process_entrypoint  0  bad_file_name
701 test_check_star_name  $bar     process_entrypoint  0  bad_file_name
702 test_check_star_name  $**      process_entrypoint  0  bad_file_name
703 test_check_star_name  foo$     process_entrypoint  0  0
704 test_check_star_name  **$      process_entrypoint  1  0
705 test_check_star_name  foo$bar  process_entrypoint  0  0
706 test_check_star_name  foo$**   process_entrypoint  1  0
707 test_check_star_name  **$bar   process_entrypoint  1  0
708 test_check_star_name  **$**    process_entrypoint  1  0
709 
710 test_check_star_name  |        ""  0  bad_file_name
711 test_check_star_name  |bar     ""  0  bad_file_name
712 test_check_star_name  |*       ""  0  bad_file_name
713 test_check_star_name  foo|     ""  0  bad_file_name
714 test_check_star_name  **|      ""  0  bad_file_name
715 test_check_star_name  foo|bar  ""  0  bad_file_name
716 test_check_star_name  foo|**   ""  0  bad_file_name
717 test_check_star_name  **|bar   ""  0  bad_file_name
718 test_check_star_name  **|**    ""  0  bad_file_name
719 
720 test_check_star_name  |        ignore_entrypoint  0  0
721 test_check_star_name  |bar     ignore_entrypoint  0  0
722 test_check_star_name  |**      ignore_entrypoint  1  0
723 test_check_star_name  foo|     ignore_entrypoint  0  0
724 test_check_star_name  **|      ignore_entrypoint  1  0
725 test_check_star_name  foo|bar  ignore_entrypoint  0  0
726 test_check_star_name  foo|**   ignore_entrypoint  1  0
727 test_check_star_name  **|bar   ignore_entrypoint  1  0
728 test_check_star_name  **|**    ignore_entrypoint  1  0
729 
730 test_check_star_name  |        process_entrypoint  0  bad_file_name
731 test_check_star_name  |bar     process_entrypoint  0  bad_file_name
732 test_check_star_name  |**      process_entrypoint  0  bad_file_name
733 test_check_star_name  foo|     process_entrypoint  0  0
734 test_check_star_name  **|      process_entrypoint  1  0
735 test_check_star_name  foo|bar  process_entrypoint  0  0
736 test_check_star_name  foo|**   process_entrypoint  1  0
737 test_check_star_name  **|bar   process_entrypoint  1  0
738 test_check_star_name  **|**    process_entrypoint  1  0
739 
740 test_check_star_name  =       ""  0  badequal
741 test_check_star_name  =x      ""  0  badequal
742 test_check_star_name  =*      ""  0  badequal
743 test_check_star_name  x=      ""  0  badequal
744 test_check_star_name  *=      ""  0  badequal
745 test_check_star_name  x=x     ""  0  badequal
746 test_check_star_name  *=*     ""  0  badequal
747 
748 test_check_star_name  =       ignore_equal  0  0
749 test_check_star_name  =x      ignore_equal  0  0
750 test_check_star_name  =*      ignore_equal  1  0
751 test_check_star_name  x=      ignore_equal  0  0
752 test_check_star_name  *=      ignore_equal  1  0
753 test_check_star_name  x=x     ignore_equal  0  0
754 test_check_star_name  *=*     ignore_equal  1  0
755 
756 test_check_star_name  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   ""  0  entlong
757 test_check_star_name  **.**.**.**.**.**.**.**.**.**.**.*  ""  0  entlong
758 
759 test_check_star_name  xxx     ignore_archive,process_archive  0  inconsistent
760 test_check_star_name  xxx     ignore_entrypoint,process_entrypoint  0  inconsistent
761 test_check_star_name  xxx     ignore_path,process_path  0  inconsistent
762 
763 test_check_star_name  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   ignore_length  0  0
764 test_check_star_name  **.**.**.**.**.**.**.**.**.**.**.*  ignore_length  2  0
765 
766 test_check_star_name  Û       ""  0  invalid_ascii
767 test_check_star_name  Û       ignore_nonascii  0  0
768 test_check_star_name  Û>x     process_path  0  badpath
769 test_check_star_name  Û>x     ignore_nonascii,process_path  0  0
770 
771 test_check_star_name  ""                ""  0  null_name_component
772 test_check_star_name  .                 ""  0  null_name_component
773 test_check_star_name  .foo              ""  0  null_name_component
774 test_check_star_name  foo.              ""  0  null_name_component
775 test_check_star_name  foo..bar          ""  0  null_name_component
776 test_check_star_name  ""                ignore_null  0  0
777 test_check_star_name  .                 ignore_null  0  0
778 test_check_star_name  .foo              ignore_null  0  0
779 test_check_star_name  foo.              ignore_null  0  0
780 test_check_star_name  foo..bar          ignore_null  0  0
781 
782 test_check_star_name  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    reject_wild  0  0
783 test_check_star_name  *.*.*.*.*.*.*.*.*.*.*.*             reject_wild  1  nostars
784 test_check_star_name  **.**.**.**.**.**.**.**.**.**.*     reject_wild  2  nostars
785 
786 test_check_star_name  xxx     unimplemented  0  bad_arg