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";
26 print "not " if $_ ne $expected;
28 print "# |@r|\nnot " if @r < 9;
31 # check if <*/*> works
37 # atleast {argv,abbrev,anydbm,autoloader,append,arith,array,assignwarn,auto}.t
38 print "# |@r|\nnot " if @r < 9;
42 # check if scalar context works
44 while (defined($_ = ($^O eq 'MacOS') ? <:*:a*.t> : <*/a*.t>)) {
48 print "not " if @r != $r;
51 # check if list context works
64 print "not " if @r != $r;
67 # test if implicit assign to $_ in while() works
80 print "not " if @r != $r;
83 # test if explicit glob() gets assign magic too
85 my $pat = ($^O eq 'MacOS') ? ':*:a*.t': '*/a*.t';
90 print "not " if "@r" ne "@s";
93 # how about in a different package, like?
95 use File::DosGlob 'glob';
97 while (glob '*/a*.t') {
101 print "not " if "@r" ne "@s";
104 # test if different glob ops maintain independent contexts
116 print "not " if "@r" ne "@s";
119 # how about a global override, hm?
121 use File::DosGlob 'GLOBAL_glob';
128 while (glob '*/b*.t') {
134 print "not " if "@r" ne "@s";