summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-07-03 09:53:00 +0000
committerNicholas Clark <nick@ccl4.org>2021-07-05 06:11:04 +0000
commitf29156f5bc3d7cbcc790b9a96cb5726162b75a87 (patch)
tree839b87952b5703edec76e1d4244492e54b6fc0fe /dist
parentb188a4d779908b10bb17b176e027059d72643dd6 (diff)
downloadperl-f29156f5bc3d7cbcc790b9a96cb5726162b75a87.tar.gz
Change dumper.t to done_testing() from plan() and an explicit test count.
As our minimum perl version is now 5.8.1, that comes with a Test::More that is new enough to support done_testing(). This avoids frustrations with cherry-picks between branches ignoring the hunk that updates the test count, because both "sides" made the same textual change, and hence getting it "wrong" (make test fails) because both sides meant "+6", not "this new count". Also fix up some whitespace, and remove a long obsolete XXXif. (Added by c4cce84862ab583d, but the corresponding close was already removed by commit 531383e69c1fff07)
Diffstat (limited to 'dist')
-rw-r--r--dist/Data-Dumper/t/dumper.t14
1 files changed, 5 insertions, 9 deletions
diff --git a/dist/Data-Dumper/t/dumper.t b/dist/Data-Dumper/t/dumper.t
index 0204796899..3cd86a6986 100644
--- a/dist/Data-Dumper/t/dumper.t
+++ b/dist/Data-Dumper/t/dumper.t
@@ -15,7 +15,6 @@ $Data::Dumper::Sortkeys = 1;
$Data::Dumper::Pad = "#";
my $XS;
-my $TMAX = 504;
# 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
@@ -27,12 +26,9 @@ if (defined &Data::Dumper::Dumpxs) {
}
else {
print "### XS extensions not loaded, will NOT run XS tests\n";
- $TMAX /= 2;
$XS = 0;
}
-plan(tests => $TMAX);
-
our ( @a, $c, $d, $foo, @foo, %foo, @globs, $v, $ping, %ping );
our ( @dogs, %kennel, $mutts );
@@ -191,8 +187,7 @@ sub TEST_BOTH {
}
}
-#XXXif (0) {
-#############
+
#############
my @c = ('c');
@@ -232,7 +227,6 @@ SCOPE: {
$want);
}
-
#############
##
$want = <<'EOT';
@@ -391,7 +385,6 @@ EOT
$want);
}
-
#############
##
$want = <<'EOT';
@@ -588,6 +581,7 @@ EOT
#############
#############
+
{
package main;
@dogs = ( 'Fido', 'Wags' );
@@ -1064,7 +1058,7 @@ EOT
# This is messy.
# The controls (bare numbers) are stored either as integers or floating point.
-# [depending on whether the tokeniser sees things like ".".
+# [depending on whether the tokeniser sees things like ".".]
# The peephole optimiser only runs for constant folding, not single constants,
# so I already have some NVs, some IVs
# The string versions are not. They are all PV
@@ -1941,3 +1935,5 @@ EOT
'names that are not simple strings: Dumpxs()',
$want);
}
+
+done_testing();