In article <[EMAIL PROTECTED]>, Eric Wilhelm
<[EMAIL PROTECTED]> wrote:

> At the bottom of a test file:
> 
>   {my $finish = 1; END {$finish or die "\n  unplanned exit"}};
> 
> Yeah, you have to remember to put it at the end of the file, but it may 
> be easier than counting tests.  Thoughts? 

You don't have to remember to put it at the bottom of the file if you
start with a template. :)

I run into problems where a loop runs fewer iterations than it should
but the test script otherwise runs to completion normally.

That's also a problem for the "just run it and see" argument. Sure, it
works for simple things, but when you get into hundreds or thousands of
tests, it's difficult to know if the humber you ran is the number you
were supposed to run. (This often is the case when I'm running
something that has several boundary conditions and I'm running every
combination of those. The factorials get big quick :)

Reply via email to