No you can't Yes you can have test.pl and t/test.t and get both run AFAIK. The test dir/file is specified in the Makefile when you do perl Makefile.PL. If there is a t/ dir then that is what is used. If there is not a t/dir then test.pl is used.
[root@devel3 test]# perl -MFile::Find -e 'File::Find::find( sub{print +$File::Find::name, $/, `cat $_`, $/,$/}, "." )'; cat: .: Is a directory . ./test.pl #!/usr/bin/perl use Test; BEGIN{plan tests => 1} ok(1); ./Makefile.PL use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'T', ); ./T.pm package T; 1; cat: t: Is a directory ./t ./t/test_t.t #!/usr/bin/perl use Test; BEGIN{plan tests => 1} ok(1); [root@devel3 test]# perl Makefile.PL Writing Makefile for T [root@devel3 test]# make cp T.pm blib/lib/T.pm [root@devel3 test]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/test_t....ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.02 cusr + 0.00 csys = 0.02 C +PU) PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl 1..1 ok 1 [root@devel3 test]# mv t t.ignore [root@devel3 test]# perl Makefile.PL Writing Makefile for T [root@devel3 test]# make [root@devel3 test]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl 1..1 ok 1 [root@devel3 test]# [root@devel3 test]# rm -f test.pl [root@devel3 test]# perl Makefile.PL Writing Makefile for T [root@devel3 test]# make [root@devel3 test]# make test No tests defined for T extension. [root@devel3 test]# [root@devel3 test]# mv t.ignore/ t [root@devel3 test]# perl Makefile.PL Writing Makefile for T [root@devel3 test]# make [root@devel3 test]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/test_t....ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.01 cusr + 0.01 csys = 0.02 C +PU) [root@devel3 test]#
cheers
tachyon
In reply to Re: Module testing using passwords
by tachyon
in thread Module testing using passwords
by bigmacbear
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |