From: Nicholas Clark Date: Fri, 28 Jan 2005 13:59:40 +0000 (+0000) Subject: Calculate the number of tests in one place, so that the skip()s will X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b37cb8219ff2bec6842038e1ec5cb9efeb4c223a;p=p5sagit%2Fp5-mst-13.2.git Calculate the number of tests in one place, so that the skip()s will always agree with the plan()s p4raw-id: //depot/perl@23894 --- diff --git a/ext/B/t/optree_check.t b/ext/B/t/optree_check.t index 03ccbcb..ee682fd 100644 --- a/ext/B/t/optree_check.t +++ b/ext/B/t/optree_check.t @@ -29,10 +29,11 @@ cmdline args in 'standard' way across all clients of OptreeCheck. =cut -plan tests => 5 + 15 + 16 * $gOpts{selftest}; # pass()s + $#tests +my $tests = 5 + 15 + 16 * $gOpts{selftest}; # pass()s + $#tests +plan tests => $tests; SKIP: { - skip "no perlio in this build", 5 + 17 + 14 * $gOpts{selftest} + skip "no perlio in this build", $tests unless $Config::Config{useperlio}; diff --git a/ext/B/t/optree_concise.t b/ext/B/t/optree_concise.t index b839fb8..b14af0d 100644 --- a/ext/B/t/optree_concise.t +++ b/ext/B/t/optree_concise.t @@ -20,9 +20,10 @@ BEGIN { use OptreeCheck; # ALSO DOES @ARGV HANDLING !!!!!! use Config; -plan tests => 23; +my $tests = 23; +plan tests => $tests; SKIP: { -skip "no perlio in this build", 24 unless $Config::Config{useperlio}; +skip "no perlio in this build", $tests unless $Config::Config{useperlio}; $SIG{__WARN__} = sub { my $err = shift;