On Mon, Feb 04, 2002 at 01:43:30AM +0000, Mark Fowler wrote:
> Please excuse the roughness of this module, but get feedback early is what
> they say. For now, I've thrown it up at
>
> http://2shortplanks.com/temp/tbt
>
> And I'll let the start of the pod speak for itself:
>
> NAME
> Test::Builder::Tester - test testsuites that have been
> built with Test::Builder
>
> SYNOPSIS
> use Test::Builder::Tester tests => 1;
> use Test::More;
>
> test_out("not ok 1 - foo");
> test_err("# Failed test ($0 at line 5)");
> fail("foo");
> test_test("fail works");
>
> Useful things that I could do with feedback on:
>
> 1. Is this crack fuelled, or is this actually useful? (or has this been
> done elsewhere - e.g. is Test::Catch good enough)
Yes, very useful, thank you! Tie::Catch sucks. If you look a things
like t/fail-more.t in the Test::More test suite you'll see the
horrible things I've done to test TB's output. This is much easier.
> 2. Is Test::Builder::Tester the most sensible name for it?
Good nuff.
> 3. Um, licencing of borrowed code (see AUTHOR)
Take whatever you like. In fact, if you don't mind, I'd like to
distribute this with Test::Builder/More/Simple so I can use it to test
all that.
> 4. Does this work on older perls...I don't see any reason why not, but
> I've only tested it on 5.6.1
I'll beat on it with my battery of perls.
Only suggestion is this:
# okay, reconnect the test suite back to stdout, stderr
$t->output(\*STDOUT);
$t->failure_output(\*STDERR);
$t->todo_output(\*STDERR);
should instead be:
# okay, reconnect the test suite back to stdout, stderr
$t->output($Saved_Output);
$t->failure_output($Saved_Failure_Ouput);
$t->todo_output($Saved_Todo_Output);
where $Saved_* are saved by _start_testing. That way if the user has
set their outputs elsewhere they will be undisturbed.
The bit about no_ending() I'll have to think about.
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
IMHO bugs in Perl 5 shouldn't carry over to Perl 6. (Unless, of course,
we *like* the bugs... ;)
-- Ken Fox in <[EMAIL PROTECTED]>