When you're root, many things become writable.
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 26 Oct 2001 18:42:58 +0000 (18:42 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 26 Oct 2001 18:42:58 +0000 (18:42 +0000)
p4raw-id: //depot/perl@12697

lib/ExtUtils/Mkbootstrap.t
lib/ExtUtils/Packlist.t

index 8ff667f..3a8e461 100644 (file)
@@ -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';
index bdcecdf..3e455b7 100644 (file)
@@ -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';