--- Eric Wilhelm <[EMAIL PROTECTED]> wrote: > # from Ovid > # on Monday 16 April 2007 02:29 am: > > >I need to skip the > >rest of the tests, but I want to use a plan and I don't want to keep > >counting the number of tests after the skip. > ... > > my $remaining_tests = looks_like_number($plan) > > ? $plan - $builder->current_test > > : 1; # always show at least one test skipped > > That does lose the rigor of knowing whether you've run enough tests > up > to this point. But, it seems the only way to address that is to > count.
Good point. I suppose I could say hardcode the test count there as I tend to add tests to the end, but I do hate hardcoding information. > Also, when does the ': 1' apply? If you have a 'no_plan', the ': 1' ensures that the skip block message (I don't think this has a formal name in TAP) shows up at least once. If it's not there, even though there's a skip, you won't see the message and you won't know that anything's been skipped. Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/
