Hello,
On Feb 4, 2009, at 10:35 PM, Ovid wrote:
Thoughts on first order support:
use Test::More;
plan(3);
pass;
pass;
pass;
plan(2)
pass;
pass;
done_testing() # optional
I just made a branch of Test::Builder which does this. You can see the
expected behaviour in the tests at:
http://github.com/gaurav/test-more/tree/incremental-planning/t/incremental_planning/
(or http://tinyurl.com/ad8mb4)
I've modified Test::Builder to emit incremental plans ("1..2
[individual test results] 3..4 [..] 5..7") since this was easier to
throw together in an evening, but if you avoid C<plan()> entirely and
put a C<done_testing()> at the end of the test, you'll get one, single
plan combining all the tests run until then (see the end of t/
incremental_planning/simple.t to see what I mean). This should work in
current TAP parsers.
This code's quick, dirty and messy, but I thought having a prototype
incremental T::B to play around with might help us think out the best
way to go forward with incremental planning. Git's flexibility means
that moving code back into the Test::Builder mainline should be
straightforward, too. If you don't want to muck about with Git, you
can get a tarball of my branch at:
http://github.com/gaurav/test-more/tarball/incremental-planning-try1
cheers,
Gaurav