1N/A chdir 't' if -d 't'; 1N/A# these files help the test run 1N/A# these files are needed for the module itself 1N/A# We're going to be chdir'ing and modules are sometimes loaded on the 1N/A# fly in this test, so we need an absolute @INC. 1N/A# keep track of everything added so it can all be deleted 1N/A# use module, import functions 1N/A# Just in case any old files were lying around. 1N/Aok( mkdir( 'mantest', 0777 ), 'make mantest directory' ); 1N/Aok( chdir( 'mantest' ), 'chdir() to mantest' ); 1N/A# there shouldn't be a MANIFEST there 1N/A# Canonize the order. 1N/Ais( $warn, "Added to MANIFEST: foo|Added to MANIFEST: MANIFEST|", 1N/A "mkmanifest() displayed its additions" ); 1N/Aok( -e 'MANIFEST', 'create MANIFEST file' ); 1N/A# after adding bar, the MANIFEST is out of date 1N/A# it reports that bar has been added and throws a warning 1N/A# now quiet the warning that bar was added and test again 1N/A# add a skip file with a rule to skip itself (and the nonexistent glob '*baz*') 1N/A# this'll skip the new file 1N/A# add a subdirectory and a file there that should be found 1N/Aok( mkdir( 'moretest', 0777 ), 'created moretest directory' ); 1N/A# only MANIFEST and foo are in the manifest 1N/A 'both files found' ); 1N/A# poison the manifest, and add a comment that should be reported 1N/A 'maniread found comment' ); 1N/Aok( mkdir( 'copy', 0777 ), 'made copy directory' ); 1N/A# a newline comes through, so get rid of it 1N/A# the copy should have given one warning and one error 1N/A# tell ExtUtils::Manifest to use a different file 1N/A ($res, $warn) = catch_warning( \&mkmanifest ); 1N/A # add the new file to the list of files to be deleted 1N/A# There was a bug where entries in MANIFEST would be blotted out 1N/A# VMS downcases the MANIFEST. We normalize it here to match. 1N/A skip "Can't make MANIFEST read-only", 2 if -w 'MANIFEST'; 1N/A is( $@, '', "maniadd() won't open MANIFEST if it doesn't need to" ); 1N/A "maniadd() dies if it can't open the MANIFEST" ); 1N/A # now get rid of the parent directory 1N/A ok( chdir( $cwd ), 'return to parent directory' );