This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
-x should be C<-x>, reported by Gerben Wierda.
[perl5.git] / t / op / filetest.t
index d1332f0..13c5917 100644 (file)
@@ -24,8 +24,15 @@ print "ok 4\n";
 print "not " unless -r 'TEST';
 print "ok 5\n";
 
-print "not " if -w 'TEST';
-print "ok 6\n";
+# make sure TEST is r-x
+eval { chmod 0555, 'TEST' };
+if ($@) {
+  print "#[$@]\nok 6 # skipped\n";
+}
+else {
+  print "not " if -w 'TEST';
+  print "ok 6\n";
+}
 
 # Scripts are not -x everywhere.