@@ -14,7 +14,7 @@ chdir 't';
14
14
15
15
use strict;
16
16
17
- use Test::More tests => 92 ;
17
+ use Test::More tests => 81 ;
18
18
use Cwd;
19
19
20
20
use File::Spec;
@@ -75,7 +75,7 @@ sub remove_dir {
75
75
BEGIN {
76
76
use_ok( ' ExtUtils::Manifest' ,
77
77
qw( mkmanifest
78
- maniread manicopy skipcheck maniadd maniskip) );
78
+ maniread skipcheck maniadd maniskip) );
79
79
}
80
80
81
81
my $cwd = Cwd::getcwd();
@@ -87,14 +87,7 @@ ok( mkdir( 'mantest', 0777 ), 'make mantest directory' );
87
87
ok( chdir ( ' mantest' ), ' chdir() to mantest' );
88
88
ok( add_file(' foo' ), ' add a temporary file' );
89
89
90
- # This ensures the -x check for manicopy means something
91
- # Some platforms don't have chmod or an executable bit, in which case
92
- # this call will do nothing or fail, but on the platforms where chmod()
93
- # works, we test the executable bit is copied
94
- chmod ( 0744, ' foo' ) if $Config {' chmod' };
95
-
96
90
my ($res , $warn );
97
-
98
91
add_file(' MANIFEST' ,<<'EOF' );
99
92
foo
100
93
MANIFEST
@@ -132,38 +125,11 @@ add_file( File::Spec->catfile('moretest', 'quux'), 'quux' );
132
125
ok( exists ( ExtUtils::Manifest::manifind()-> {' moretest/quux' } ),
133
126
" manifind found moretest/quux" );
134
127
135
- my $files = maniread();
136
- ok( mkdir ( ' copy' , 0777 ), ' made copy directory' );
137
-
138
- # Check that manicopy copies files.
139
- manicopy( $files , ' copy' , ' cp' );
140
- my @copies = ();
141
- find( sub { push @copies , $_ if -f }, ' copy' );
142
- @copies = map { s /\. $// ; $_ } @copies if $Is_VMS ; # VMS likes to put dots on
143
- # the end of files.
144
- # Have to compare insensitively for non-case preserving VMS
145
- is_deeply( [sort map { lc } @copies ], [sort map { lc } keys %$files ] );
146
-
147
- # cp would leave files readonly, so check permissions.
148
- foreach my $orig (@copies ) {
149
- my $copy = " copy/$orig " ;
150
- ok( -r $copy , " $copy : must be readable" );
151
- is( -w $copy , -w $orig , " writable if original was" );
152
- is( -x $copy , -x $orig , " executable if original was" );
153
- }
154
- rmtree(' copy' );
128
+
155
129
add_file( ' MANIFEST' , ' none #none' );
156
- ok( mkdir ( ' copy' , 0777 ), ' made copy directory' );
157
130
158
- $files = maniread();
159
- eval { (undef , $warn ) = catch_warning( sub {
160
- manicopy( $files , ' copy' , ' cp' ) })
161
- };
131
+ my $files = maniread();
162
132
163
- # a newline comes through, so get rid of it
164
- chomp ($warn );
165
- # the copy should have given a warning
166
- like($warn , qr / ^none not found/ , ' carped about none' );
167
133
($res , $warn ) = catch_warning( \&skipcheck );
168
134
like($warn , qr / ^Skipping MANIFEST.SKIP/ i , ' warned about MANIFEST.SKIP' );
169
135
@@ -426,7 +392,7 @@ END {
426
392
is(( unlink $file ), 1, " Unlink $file " ) or note " $! " ;
427
393
}
428
394
for my $file ( keys %Files ) { 1 while unlink $file ; } # all versions
429
- remove_dir( ' moretest' , ' copy ' );
395
+ remove_dir( ' moretest' );
430
396
431
397
# now get rid of the parent directory
432
398
ok( chdir ( $cwd ), ' return to parent directory' );
0 commit comments