Re: ANNOUNCE Test::Simple 0.14 WITH A TUTORIAL!

2001-08-22 Thread Michael G Schwern

On Wed, Aug 22, 2001 at 10:45:35PM +0100, Nicholas Clark wrote:
 There's a potentially useful feature of Test.pm missing from Test::Simple
 (and therefore Test::More)
 The second argument of ok() is a diagnostic rather than a name
 It's also allowed to be a code reference, which is run to get a string.
 This means it's possible to write a test like this
 
 ok (seek (TEST, $sub_start, SEEK_SET), sub {seek failed with \$!=$!});
 
 and get the value of $! from after the test failing printed as part of the
 output.
 
 I can't see how to do this with Test::Simple.

This should work.

ok( seek(TEST, $sub_start, SEEK_SET) ) || 
print # seek failed with $!\n;

I plan to add a print_comment() function to Test::More eventually, so
everything is nice and escaped.


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
That which stirs me, stirs everything.
-- Squonk Opera, Spoon



ANNOUNCE Test::Simple 0.14 WITH A TUTORIAL!

2001-08-22 Thread Michael G Schwern

Just uploaded Test::Simple 0.14.  The big news is I've added in a
first shot at a testing tutorial.  It's pretty simple at the moment
and missing a bunch of things, but I've gotten so many requests for
some sort of tutorial that I didn't want to hold it back.

So read Test::Tutorial.

http://www.pobox.com/~schwern/src/Test-Simple-0.14.tar.gz


-- 

Michael G. Schwern   [EMAIL PROTECTED]http://www.pobox.com/~schwern/
Perl6 Quality Assurance [EMAIL PROTECTED]   Kwalitee Is Job One
I'm spanking my yacht.