From: Rafael Garcia-Suarez Date: Mon, 25 May 2009 10:22:16 +0000 (+0200) Subject: Fix test if Fcntl couldn't be loaded (for example with miniperl) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=822146ea0637f51a9846d811cc7f7c5ebe3b8069;p=p5sagit%2Fp5-mst-13.2.git Fix test if Fcntl couldn't be loaded (for example with miniperl) --- diff --git a/t/op/filetest.t b/t/op/filetest.t index 4678f92..c46bdc1 100755 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -143,7 +143,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 +156,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"); }