http://www.perlmonks.org?node_id=566474


in reply to Re^2: Toggling test plans with vim
in thread Toggling test plans with vim

Wouldn't having a tests_complete() function at the end of the test also solve (most of) these problems.
-- gam3
A picture is worth a thousand words, but takes 200K.

Replies are listed 'Best First'.
An alternative to 'no_plan'
by markjugg (Curate) on Aug 10, 2006 at 00:57 UTC
    That seems like a good idea to me. Why wouldn't this be a reasonable alternative to keeping track of a test count:
    use Test::More 'declare_done'; # tests here.... done_testing();
    I've declared that my plan is to declare when I'm done testing. At the end of the test script, I do just that. Now, if the script exits early and done_testing() hasn't be called, we know there was a problem, and we know where it is, because we know the last test that was run.
      Yeah. That's certainly a lot simpler than counting.

      I wish someone would write that module.

      Excellent idea. Simplicity incarnate.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re^4: Toggling test plans with vim
by Anonymous Monk on Aug 11, 2006 at 09:05 UTC
    Maybe you should suggest it to the maintainer(s) of Test::More?