Dominique Quatravaux wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy Lester wrote:
Good Lord do I get frustrated at the handwringing over test
counting.  Look, it's simple.  You write your tests.  You run it
through prove.  You see how many tests it reports.  You add it at
the top of the file.  Voila!

And what if you are running a variable number of tests depending on
stuff such as compile-time options, maintainer mode enabled or not, or
whatever?

What about it?

Go look at the PPI regression test scripts, those have a block at the top before a plan is declared that look for matching pairs of ".code" and ".dump" files, multiply it by 7 or something and add 5 and that's the number of tests. If anything goes wrong, it dies, the test ends without a plan declaration and the test script is thus seen to have failed.

There's no reason that you can't calculate the number of tests in advance in cases where skip doesn't quite get you enough functionality.

Adam K

Reply via email to