From: Karl Williamson Date: Thu, 5 Mar 2015 21:47:16 +0000 (-0700) Subject: Data::Dumper/t/dumper.t: only specify number of tests once X-Git-Tag: v5.21.10~115 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/d5cfd677c785b1cdcd4ebde6c85aa07aa81dce85 Data::Dumper/t/dumper.t: only specify number of tests once This calculates the number of tests when some modules are unavailable, instead of it having to be specified each time there is a change. --- diff --git a/dist/Data-Dumper/t/dumper.t b/dist/Data-Dumper/t/dumper.t index 0824871..3ee4bcd 100644 --- a/dist/Data-Dumper/t/dumper.t +++ b/dist/Data-Dumper/t/dumper.t @@ -77,17 +77,20 @@ sub SKIP_TEST { ++$TNUM; print "ok $TNUM # skip $reason\n"; } +$TMAX = 438; + # Force Data::Dumper::Dump to use perl. We test Dumpxs explicitly by calling # it direct. Out here it lets us knobble the next if to test that the perl # only tests do work (and count correctly) $Data::Dumper::Useperl = 1; if (defined &Data::Dumper::Dumpxs) { print "### XS extension loaded, will run XS tests\n"; - $TMAX = 438; $XS = 1; + $XS = 1; } else { print "### XS extensions not loaded, will NOT run XS tests\n"; - $TMAX = 219; $XS = 0; + $TMAX /= 2; + $XS = 0; } print "1..$TMAX\n";