X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Ffiletest.t;h=fcded7ad0374038befc3625a1f9c2bb27c29dc89;hb=397cf4b72b64bab2d81c27006b39549ca667b5a8;hp=9228b5730b9de16df154c9afd9de7884d6d129bd;hpb=9a4da9311d34e77ffdec7b888a8a3f66535ff14e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/filetest.t b/t/op/filetest.t index 9228b57..fcded7a 100755 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -5,8 +5,10 @@ BEGIN { chdir 't' if -d 't'; + @INC = '../lib'; } +use Config; print "1..10\n"; print "not " unless -d 'op'; @@ -33,7 +35,13 @@ 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 ($Config{config_args} =~/Dmksymlinks/) { + print "ok 6 #skipped, we cannot chmod symlinks\n"; +} +elsif ($bad_chmod) { print "#[$@]\nok 6 #skipped\n"; } else { @@ -43,15 +51,21 @@ 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...) -print "not " unless -w 'op'; -print "ok 8\n"; +if ($Config{d_seteuid}) { + print "not " unless -w 'op'; + print "ok 8\n"; +} else { + print "ok 8 #skipped, no seteuid\n"; +} print "not " unless -x 'op'; # Hohum. Are directories -x everywhere? print "ok 9\n";