_RMEND_
close(RM) || die "Can't close $ext$modpname/README: $!\n";
-warn "Writing $ext$modpname/test.pl\n";
-open(EX, ">test.pl") || die "Can't create $ext$modpname/test.pl: $!\n";
+my $testdir = "t";
+my $testfile = "$testdir/1.t";
+mkdir "$testdir" or die "Cannot mkdir $testdir: $!\n";
+warn "Writing $ext$modpname/$testfile\n";
+open EX, ">$testfile" or die "Can't create $ext$modpname/$testfile: $!\n";
print EX <<'_END_';
# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
+# `make test'. After `make install' it should work as `perl 1.t'
#########################
# its man page ( perldoc Test ) for help writing this test script.
_END_
-close(EX) || die "Can't close $ext$modpname/test.pl: $!\n";
+close(EX) || die "Can't close $ext$modpname/$testfile: $!\n";
unless ($opt_C) {
warn "Writing $ext$modpname/Changes\n";
warn "Writing $ext$modpname/MANIFEST\n";
open(MANI,'>MANIFEST') or die "Can't create MANIFEST: $!";
-my @files = <*>;
+my @files = grep { -f } (<*>, <t/*>);
if (!@files) {
eval {opendir(D,'.');};
unless ($@) { @files = readdir(D); closedir(D); }