Manifest.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
BEGIN {
chdir 't' if -d 't';
}
else {
}
}
chdir 't';
use strict;
# these files help the test run
use Cwd;
# these files are needed for the module itself
# We're going to be chdir'ing and modules are sometimes loaded on the
# fly in this test, so we need an absolute @INC.
# keep track of everything added so it can all be deleted
my %Files;
sub add_file {
print T $data;
close T;
}
sub read_manifest {
close M;
return @files;
}
sub catch_warning {
my $warn;
}
sub remove_dir {
}
# use module, import functions
BEGIN {
}
# Just in case any old files were lying around.
# there shouldn't be a MANIFEST there
# Canonize the order.
"mkmanifest() displayed its additions" );
# and now you see it
# after adding bar, the MANIFEST is out of date
# it reports that bar has been added and throws a warning
# now quiet the warning that bar was added and test again
};
# add a skip file with a rule to skip itself (and the nonexistent glob '*baz*')
# this'll skip the new file
my @skipped;
});
{
}
# add a subdirectory and a file there that should be found
# only MANIFEST and foo are in the manifest
$_ = 'foo';
'both files found' );
# poison the manifest, and add a comment that should be reported
'maniread found comment' );
};
# a newline comes through, so get rid of it
chomp($warn);
# the copy should have given one warning and one error
# tell ExtUtils::Manifest to use a different file
{
($res, $warn) = catch_warning( \&mkmanifest );
# add the new file to the list of files to be deleted
}
# Make sure MANIFEST.SKIP is using complete relative paths
# There was a bug where entries in MANIFEST would be blotted out
# by MANIFEST.SKIP rules.
# VMS downcases the MANIFEST. We normalize it here to match.
'foo' => 'bar'
);
SKIP: {
eval {
};
eval {
};
"maniadd() dies if it can't open the MANIFEST" );
}
END {
# now get rid of the parent directory
}