X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fdosglob.t;h=fd9bb1d1198de2fd379d6c82edf64d6a247d5727;hb=569bd3158af2276a406770e3d68e76b7da59b730;hp=7398a1406525c2d31101014d2781184831d649d7;hpb=50e27ac33704d6fb34d4be7cfb426b2097b27505;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/dosglob.t b/t/lib/dosglob.t old mode 100644 new mode 100755 index 7398a14..fd9bb1d --- a/t/lib/dosglob.t +++ b/t/lib/dosglob.t @@ -9,7 +9,7 @@ BEGIN { @INC = '../lib'; } -print "1..9\n"; +print "1..10\n"; # override it in main:: use File::DosGlob 'glob'; @@ -39,7 +39,7 @@ while (defined($_ = <*/a*.t>)) { print "not " if @r != $r; print "ok 4\n"; -# check if array context works +# check if list context works @r = (); for (<*/a*.t>) { print "# $_\n"; @@ -92,3 +92,21 @@ while (<*/a*.t>) { print "not " if "@r" ne "@s"; print "ok 9\n"; +# how about a global override, hm? +eval <<'EOT'; +use File::DosGlob 'GLOBAL_glob'; +package Bar; +@s = (); +while (<*/a*.t>) { + my $i = 0; + print "# $_ <"; + push @s, $_; + while (glob '*/b*.t') { + print " $_"; + $i++; + } + print " >\n"; +} +print "not " if "@r" ne "@s"; +print "ok 10\n"; +EOT