From: Jarkko Hietaniemi Date: Fri, 26 Oct 2001 18:42:58 +0000 (+0000) Subject: When you're root, many things become writable. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e1eb1c15da9011a2b90e91c2fdfd32749d946514;p=p5sagit%2Fp5-mst-13.2.git When you're root, many things become writable. p4raw-id: //depot/perl@12697 --- diff --git a/lib/ExtUtils/Mkbootstrap.t b/lib/ExtUtils/Mkbootstrap.t index 8ff667f..3a8e461 100644 --- a/lib/ExtUtils/Mkbootstrap.t +++ b/lib/ExtUtils/Mkbootstrap.t @@ -75,8 +75,12 @@ SKIP: { close OUT; chmod 0444, 'dasboot.bs'; - eval{ Mkbootstrap('dasboot', 1) }; - like( $@, qr/Unable to open dasboot\.bs/, 'should die given bad filename' ); + SKIP: { + skip("can write readonly files", 1) if -w 'dasboot.bs'; + + eval{ Mkbootstrap('dasboot', 1) }; + like( $@, qr/Unable to open dasboot\.bs/, 'should die given bad filename' ); + } # now put it back like it was chmod 0777, 'dasboot.bs'; diff --git a/lib/ExtUtils/Packlist.t b/lib/ExtUtils/Packlist.t index bdcecdf..3e455b7 100644 --- a/lib/ExtUtils/Packlist.t +++ b/lib/ExtUtils/Packlist.t @@ -84,8 +84,12 @@ SKIP: { # set this file to read-only chmod 0444, 'eplist'; - eval { ExtUtils::Packlist::write({}, 'eplist') }; - like( $@, qr/Can't open file/, 'write() should croak on open failure' ); + SKIP: { + skip("can write readonly files", 1) if -w 'eplist'; + + eval { ExtUtils::Packlist::write({}, 'eplist') }; + like( $@, qr/Can't open file/, 'write() should croak on open failure' ); + } #'now set it back (tick here fixes vim syntax highlighting ;) chmod 0777, 'eplist';