4 # test glob() in File::DosGlob
14 # override it in main::
15 use File::DosGlob 'glob';
17 # test if $_ takes as the default
20 $expected = $_ = ":op:a*.t";
22 $expected = $_ = "op/a*.t";
25 print "not " if $_ ne $expected;
27 print "# |@r|\nnot " if @r < 9;
30 # check if <*/*> works
36 # atleast {argv,abbrev,anydbm,autoloader,append,arith,array,assignwarn,auto}.t
37 print "# |@r|\nnot " if @r < 9;
41 # check if scalar context works
43 while (defined($_ = ($^O eq 'MacOS') ? <:*:a*.t> : <*/a*.t>)) {
47 print "not " if @r != $r;
50 # check if list context works
63 print "not " if @r != $r;
66 # test if implicit assign to $_ in while() works
79 print "not " if @r != $r;
82 # test if explicit glob() gets assign magic too
84 my $pat = ($^O eq 'MacOS') ? ':*:a*.t': '*/a*.t';
89 print "not " if "@r" ne "@s";
92 # how about in a different package, like?
94 use File::DosGlob 'glob';
96 $pat = $^O eq 'MacOS' ? ':*:a*.t' : '*/a*.t';
101 print "not " if "@r" ne "@s";
104 # test if different glob ops maintain independent contexts
106 if ($^O eq 'MacOS') {
129 print "not " if "@r" ne "@s";
132 # how about a global override, hm?
134 use File::DosGlob 'GLOBAL_glob';
137 if ($^O eq 'MacOS') {
142 while (glob ':*:b*.t') {
153 while (glob '*/b*.t') {
160 print "not " if "@r" ne "@s";