On Mon, 4 Feb 2002, Michael G Schwern wrote: > Hmmmm... I thought about the no_ending() problem and basically you > need to be able to access the internal list of test results and muck > with it to erase the results of the captured tests. > > I'll put something in for that.
Excellent, that shouldn't be to difficult to add in T::B::T. This shouldn't change the API, and it'd make most sense to check what version of Test::Builder they have installed and frob the internal list if we can, otherwise just default to calling no_ending. Of course, if you distribute it with Test::Builder then we don't need to do that (as we know they have a capable T::B) Speaking of that, I was wondering if you're going to distribute Test::Builder::Tester with Test::Builder, then it might make more sense that you take over maintenance of the module from that point on (so that everything is maintained and checked from one position.) Anyway, meanwhile, I've been working on my test suite for GD images, and this means that I've got to try out Test::Builder::Tester a bit more. I soon got tired of having to manually insert line numbers into text I'm passing to test_err, so I've added an extra function to Test::Builder::Tester called line_num that (via caller) simply returns what line you called from plus an offset. i.e. test_out("not ok 1 - foo"); test_err("# Failed test ($0 at line ".line_num(+1).")"); fail("foo"); test_test("fail works"); This is now available at the same URL as before.... http://2shortplanks.com/temp/tbt/ If there's a better way of doing this then let me know. Finally, speaking of the standard error messages that Test::Builder prints out: How stable are these? If T::B::T is testing for them then it might make sense to have a function that does something like test_out("not ok 1 - foo"); test_err(fail_line(+1)) fail("foo"); test_test("fail works"); This way if you ever change the message Test::Builder prints out for a standard line failure, all the test frameworks built with T::B::T won't break. Oh look, it's 1am again and I'm babbling. Mark. -- s'' Mark Fowler London.pm Bath.pm http://www.twoshortplanks.com/ [EMAIL PROTECTED] ';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/ +/ ){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}