Change 13741 by jhi@alpha on 2001/12/17 19:12:16

        Subject: Re: [PATCH] ...while $var = glob(...)                
        From: Robin Houston <[EMAIL PROTECTED]> 
        Date: Mon, 17 Dec 2001 20:07:02 +0000                 
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

.... //depot/perl/t/op/glob.t#14 edit

Differences ...

==== //depot/perl/t/op/glob.t#14 (xtext) ====
Index: perl/t/op/glob.t
--- perl/t/op/glob.t.~1~        Mon Dec 17 12:15:05 2001
+++ perl/t/op/glob.t    Mon Dec 17 12:15:05 2001
@@ -5,7 +5,7 @@
     @INC = '../lib';
 }
 
-print "1..10\n";
+print "1..13\n";
 
 @oops = @ops = <op/*>;
 
@@ -60,3 +60,13 @@
 print $j    == 1 ? "ok 8\n"  : "not ok 8\n";
 print $j{a} == 1 ? "ok 9\n"  : "not ok 9\n";
 print $j[0] == 1 ? "ok 10\n" : "not ok 10\n";
+
+# ... while ($var = glob(...)) should test definedness not truth
+
+# Create a file called "0"
+print open(F, ">0") ? "ok 11\n" : "not ok 11 # $!\n";
+my $ok = "not ok 12\n";
+$ok = "ok 12\n" while my $var = glob("0");
+print $ok;
+
+print unlink("0") ? "ok 13\n" : "not ok 13\n";
End of Patch.

Reply via email to