(Retracted by #8395.)
[p5sagit/p5-mst-13.2.git] / t / lib / dosglob.t
old mode 100644 (file)
new mode 100755 (executable)
index 7398a14..fd9bb1d
@@ -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