4 # test glob() in File::DosGlob
14 # override it in main::
15 use File::DosGlob 'glob';
17 # test if $_ takes as the default
20 print "not " if $_ ne 'lib/a*.t';
22 # we should have at least abbrev.t, anydbm.t, autoloader.t
23 print "# |@r|\nnot " if @r < 3;
26 # check if <*/*> works
28 # atleast {argv,abbrev,anydbm,autoloader,append,arith,array,assignwarn,auto}.t
29 print "not " if @r < 9;
33 # check if scalar context works
35 while (defined($_ = <*/a*.t>)) {
39 print "not " if @r != $r;
42 # check if array context works
48 print "not " if @r != $r;
51 # test if implicit assign to $_ in while() works
57 print "not " if @r != $r;
60 # test if explicit glob() gets assign magic too
62 while (glob '*/a*.t') {
66 print "not " if "@r" ne "@s";
69 # how about in a different package, like?
71 use File::DosGlob 'glob';
73 while (glob '*/a*.t') {
77 print "not " if "@r" ne "@s";
80 # test if different glob ops maintain independent contexts
92 print "not " if "@r" ne "@s";
95 # how about a global override, hm?
97 use File::DosGlob 'GLOBAL_glob';
104 while (glob '*/b*.t') {
110 print "not " if "@r" ne "@s";