On Sunday 04 March 2007 09:40, Shlomi Fish wrote:
My solution to this is:

Of late, one solution I've used is just Ctrl-A and Ctrl-X in Vim, with
some shortcuts:

 map  <silent> ,at m` :silent /plan tests =><CR>3w<C-A>,/``
 map  <silent> ,rt m` :silent /plan tests =><CR>3w<C-X>,/``

This works well enough for simple test files.  Note -- I always use
plan() explicitly rather than specifying a plan as part of "use
Test::More".

More often, I find myself creating some data structure to define test
cases and then:

 plan tests => $fixed + $tests_per_case * @cases;

Once I've defined the basic tests, I'm usually adding cases rather
than changing the per-case test count, so the total test count takes
care of itself.

David

Reply via email to