File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use lib 't/lib';
5
5
use ManifestTest qw( catch_warning canon_warning spew runtemp ) ;
6
6
use ExtUtils::Manifest qw( maniadd ) ;
7
7
use Config;
8
- use Test::More tests => 5 ;
8
+ use Test::More tests => 7 ;
9
9
10
10
my $LAST_ERROR ;
11
11
@@ -51,3 +51,25 @@ SKIP: {
51
51
}
52
52
53
53
};
54
+
55
+ runtemp " maniadd.unneeded_readonly_notrailingeol" => sub {
56
+ note " Ensuring maniadd does not arbitrarily make a file writeable if it lacks an EOL" ;
57
+ local $TODO = " Broken, GH #13" ;
58
+ spew( " MANIFEST" , " foo #bar" );
59
+ SKIP: {
60
+ chmod ( 0400, " MANIFEST" );
61
+
62
+ if ( -w " MANIFEST" or $Config {osname } eq " cygwin" ) {
63
+ skip " Cant make manifest readonly" , 5;
64
+ }
65
+ ok( !fatal { maniadd( { " foo" => " bar" } ) }, " maniadd() wont die adding an existing key" )
66
+ or diag $LAST_ERROR ;
67
+
68
+ ok( !-w " MANIFEST" , " MANIFEST is still readonly" );
69
+
70
+ chmod ( 0600, " MANIFEST" );
71
+
72
+ }
73
+
74
+ };
75
+
You can’t perform that action at this time.
0 commit comments