Oops misread my own test case!!! Thanks adrianh

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.