File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ chdir 't';
14
14
15
15
use strict;
16
16
17
- use Test::More tests => 64 ;
17
+ use Test::More tests => 63 ;
18
18
use Cwd;
19
19
20
20
use File::Spec;
@@ -300,19 +300,6 @@ my @funky_keys = qw(space space_quote space_backslash space_quote_backslash);
300
300
$Files {" $_ .bak" }++ for (' MANIFEST' , " MANIFEST${extsep} SKIP" );
301
301
}
302
302
303
- add_file(' MANIFEST' => ' Makefile.PL' );
304
- maniadd({ foo => ' bar' });
305
- $files = maniread;
306
- # VMS downcases the MANIFEST. We normalize it here to match.
307
- %$files = map { (lc $_ => $files -> {$_ }) } keys %$files ;
308
- my %expect = ( ' makefile.pl' => ' ' ,
309
- ' foo' => ' bar'
310
- );
311
- is_deeply( $files , \%expect , ' maniadd() vs MANIFEST without trailing newline' );
312
-
313
- # add_file('MANIFEST' => 'Makefile.PL');
314
- # maniadd({ foo => 'bar' });
315
-
316
303
END {
317
304
note " remove all files" ;
318
305
for my $file ( sort keys %Files ) {
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ use warnings;
3
3
4
4
use lib ' t/lib' ;
5
5
use ManifestTest qw( catch_warning canon_warning spew runtemp ) ;
6
- use ExtUtils::Manifest qw( maniadd ) ;
6
+ use ExtUtils::Manifest qw( maniadd maniread ) ;
7
7
use Config;
8
- use Test::More tests => 7 ;
8
+ use Test::More tests => 8 ;
9
9
10
10
my $LAST_ERROR ;
11
11
@@ -73,3 +73,18 @@ SKIP: {
73
73
74
74
};
75
75
76
+ runtemp " maniadd.auto_add_newlines" => sub {
77
+ note " Ensuring lack of a trailing source newline does not break maniadd" ;
78
+ spew( " MANIFEST" , " initial_content" );
79
+ maniadd( { " newfile" , " newcomment" } );
80
+
81
+ my $read = maniread;
82
+
83
+ # VMS downcases the MANIFEST. We normalize it here to match.
84
+ my (%got ) = map { lc $_ => $read -> {$_ } } keys %{$read };
85
+ my (%expected ) = (
86
+ " initial_content" => " " ,
87
+ " newfile" => " newcomment"
88
+ );
89
+ is_deeply( \%got , \%expected , " maniadd added new entries to MANIFEST with newline included" );
90
+ };
You can’t perform that action at this time.
0 commit comments