On Sat, Apr 21, 2001 at 04:06:52AM -0400, barries wrote:
> On Sat, Apr 21, 2001 at 08:10:43AM +0100, Michael G Schwern wrote:
> > So basically you want a default name for a block of tests? I can do
> > that, basically by calling an ok() that's a wrapper around Test::ok()
> > and will watch for a default name being set.
>
> I was thinking more along the lines of making the default name available
> in something like $Pod::Tests::current_name and tweaking Test.pm and
> others to look for it if a name isn't explicitly passed. That way the
> Pod::Tests user has their choice of what Test* module to use.
Eeeeww, that's the Really Intrusive way of doing it. Just because I
happen to maintain most of the Test::* hierarchy doesn't mean I can
get away with a hack like that.
The greater issue of how to allow people to use different Testing
modules I'm going to punt at the moment. Maybe something like this...
=for testing use My::Test
> I say don't mix Pod::Tests, a POD translator, with Test*, a collection
> of testing utility APIs. Limits current and future flexibility.
You're right, I meant pod2test.
> > Wait... how are you doing this at all? Pod::Tests doesn't support
> > multiple tests in a block yet.
>
> Pod::Tests doesn't care, but pod2tests makes assumptions that I can't
> figure out how to make smart enough (one test/POD paragraph).
Test::More will be smart enough to handle it using the new "1..M at
the end" Test::Harness feature.
> That's also why I think the simplest thing would be to run all the tests
> and have the test suite emit "# testing complete\n" when exiting
> normally, and have Test::Harness add up the number of tests.
> Test::Harness should only whine if it hasn't seen a plan or the "#
> testing complete\n" sign-off. Most module test suites do not need a
> preannounced test count. I know, I know, submit a patch...
1..M at the end takes care of this. I'm getting deja vu, didn't we go
through this already? Maybe it was with someone else... Steven Knight.
> I'm using Pod::Tests and thinking that it should never try to be too
> clever in counting up number of tests. The single most useful feature
> discussed on this whole list is plan => noplan, and I'd prefer to have
> that be the default.
Yes, pod2tests would do "use Test::More noplan;" just as soon as I
implement it.
PS TPC deadline was pushed back two weeks, so I'll have time to put in
your patch today.
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
My lips, your breast and a whole lotta strange arguing.