On Fri, Apr 20, 2001 at 08:55:53AM -0400, barries wrote:
> Below's a patch that adds #line support to Pod::Tests, making it easier
> to find the original line the test is on. This makes output from
> SelfTest trivial.
Thanks! This will have to wait until the end of the month, I've got
TPC deadlines to meet. :(
> I've also really been wishing for
>
> =for testing foo()
> ok( foo(1), 2 ) ;
> ok( foo(3), 4 ) ;
> ok( foo(5), 6 ) ;
> ok( foo(7), 8 ) ;
>
> such that if a test failed in Foo.pm, the message would be something like
>
> not ok 1
> # Test 1 got: '1' (Foo.pm at line 37)
> # Expected: '2' (foo())
>
> just to save lots of retyping of C<, "foo()"> everywhere. Getting the
> file and line of Foo.pm and having it fill in the test name nicely makes
> it really easy to nail down what's going wrong very quickly.
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'm going to switch over to Test::More as the default testing module
next version anyway. This might break any existing embedded tests you
have (since Test::More::ok() behaves differently than Test::ok()).
Ummm... not sure how to ease that bit of pain.
Wait... how are you doing this at all? Pod::Tests doesn't support
multiple tests in a block yet.
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
If you got the wax out of your ears you could hear the twister picking up
the trailer park of your future!