Change 23894 by [EMAIL PROTECTED] on 2005/01/28 13:59:40

        Calculate the number of tests in one place, so that the skip()s will
        always agree with the plan()s

Affected files ...

... //depot/perl/ext/B/t/optree_check.t#12 edit
... //depot/perl/ext/B/t/optree_concise.t#12 edit

Differences ...

==== //depot/perl/ext/B/t/optree_check.t#12 (text) ====
Index: perl/ext/B/t/optree_check.t
--- perl/ext/B/t/optree_check.t#11~23891~       Thu Jan 27 10:29:51 2005
+++ perl/ext/B/t/optree_check.t Fri Jan 28 05:59:40 2005
@@ -29,10 +29,11 @@
 
 =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};
 
 

==== //depot/perl/ext/B/t/optree_concise.t#12 (text) ====
Index: perl/ext/B/t/optree_concise.t
--- perl/ext/B/t/optree_concise.t#11~23891~     Thu Jan 27 10:29:51 2005
+++ perl/ext/B/t/optree_concise.t       Fri Jan 28 05:59:40 2005
@@ -20,9 +20,10 @@
 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;
End of Patch.

Reply via email to