X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Ffiletest.t;h=e00d5fb7b06b82eeaf782d13f74f8f819d1080a6;hb=dfed14d211a4828e9d879513466e41afb47fa3fb;hp=7e03c4294976b0f5d56effc7fe75dfce31d4a39a;hpb=3eeba6fb8b434fcb27f601771baa0ea98f44d487;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/filetest.t b/t/op/filetest.t old mode 100755 new mode 100644 index 7e03c42..e00d5fb --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -3,11 +3,12 @@ # There are few filetest operators that are portable enough to test. # See pod/perlport.pod for details. -use Config; BEGIN { chdir 't' if -d 't'; + unshift @INC, '../lib' if -d '../lib'; } +use Config; print "1..10\n"; print "not " unless -d 'op'; @@ -34,7 +35,10 @@ eval '$> = 1'; # so switch uid (may not be implemented) print "# oldeuid = $oldeuid, euid = $>\n"; -if ($bad_chmod) { +if (!$Config{d_seteuid}) { + print "ok 6 #skipped, no seteuid\n"; +} +elsif ($bad_chmod) { print "#[$@]\nok 6 #skipped\n"; } else { @@ -44,11 +48,13 @@ else { # Scripts are not -x everywhere so cannot test that. +eval '$> = $oldeuid'; # switch uid back (may not be implemented) + +# this would fail for the euid 1 +# (unless we have unpacked the source code as uid 1...) print "not " unless -r 'op'; print "ok 7\n"; -eval '$> = $oldeuid'; # switch uid back (may not be implemented) - # this would fail for the euid 1 # (unless we have unpacked the source code as uid 1...) if ($Config{d_seteuid}) {