In C<use utf8; a=>'b'>, do not set utf8 flag on 'a' [perl #68812]
[p5sagit/p5-mst-13.2.git] / t / op / filetest.t
old mode 100755 (executable)
new mode 100644 (file)
index 4678f92..0d4f7c7
@@ -101,8 +101,9 @@ my $over;
     package OverFtest;
 
     use overload 
+       fallback => 1,
         -X => sub { 
-            $over = [overload::StrVal($_[0]), $_[1]];
+            $over = [qq($_[0]), $_[1]];
             "-$_[1]"; 
         };
 }
@@ -131,11 +132,11 @@ my $over;
 }
 
 my $ft = bless [], "OverFtest";
-my $ftstr = overload::StrVal($ft);
+my $ftstr = qq($ft);
 my $str = bless [], "OverString";
 my $both = bless [], "OverBoth";
 my $neither = bless [], "OverNeither";
-my $nstr = overload::StrVal($neither);
+my $nstr = qq($neither);
 
 open my $gv, "<", "TEST";
 bless $gv, "OverString";
@@ -143,7 +144,8 @@ open my $io, "<", "TEST";
 $io = *{$io}{IO};
 bless $io, "OverString";
 
-eval { require Fcntl };
+my $fcntl_not_available;
+eval { require Fcntl } or $fcntl_not_available = 1;
 
 for my $op (split //, "rwxoRWXOezsfdlpSbctugkTMBAC") {
     $over = [];
@@ -155,9 +157,11 @@ for my $op (split //, "rwxoRWXOezsfdlpSbctugkTMBAC") {
 
     my ($exp, $is) = (1, "is");
     if (
+       !$fcntl_not_available and (
         $op eq "u" and not eval { Fcntl::S_ISUID() } or
         $op eq "g" and not eval { Fcntl::S_ISGID() } or
         $op eq "k" and not eval { Fcntl::S_ISVTX() }
+       )
     ) {
         ($exp, $is) = (0, "not");
     }