On Wednesday 25 June 2003 20:15, Adrian Howard wrote: > Add an explicit "test script finished" footer?
But how does the footer-adder know that the correct number of tests ran. You would need to declare a plan to run x additional extensions at which point you're doing sub-plans. I suppose I'm thinking of things from the I messed up my test script point of view rather than my test script died unexpectedly. Exit codes should catch the died unexpectedly stuff. A correct plan is good for catching the programmer errors but is a pain to maintain. > I have some vague thoughts that there are some potentially cute things > that you could do with extended plans that would be hard to do with > sub-blocks/plans (e.g. any sort of test that cross-cuts several test > scripts in an AOPish sort of way - checking that test data has returned > to a state of grace for example). I guess that can be solved by controlling the timing of the output. I don't think there's a need for the results of test 1 to be printed before carrying out test 2, except maybe when the tests are being run by the developer. The patch I submitted almost allows that to work. Each block gets a Test::Builder object and whenever a block is finalised, it finalises all of it's sub blocks, so you could delay output until finalisation time. So, imagine that Test::Builder objects don't output anything until they are finalised, they just collect results quietly. You create an AOP block at the top level (ie a sub-block of the root Test::Builder). Then you do all your AOP tests using this Test::Builder::Block object. At the end, when all other tests are finished and output, your AOP test block will dump out it's results. F