summaryrefslogtreecommitdiff
path: root/dist/Data-Dumper
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-05-23 10:41:41 +0000
committerNicholas Clark <nick@ccl4.org>2021-05-23 12:01:04 +0000
commit3d7e6620c57c4bb8b48ff7842746d37d02f227e9 (patch)
tree433bae2c3dd08c68e6a8faed0482019888812e14 /dist/Data-Dumper
parent59a0514c4ba064f4ed50091de3bc48bc0e8633ab (diff)
downloadperl-3d7e6620c57c4bb8b48ff7842746d37d02f227e9.tar.gz
Convert the tests for Dumpxs in list context and B::Deparse to TEST_BOTH.
Diffstat (limited to 'dist/Data-Dumper')
-rw-r--r--dist/Data-Dumper/t/dumper.t21
1 files changed, 12 insertions, 9 deletions
diff --git a/dist/Data-Dumper/t/dumper.t b/dist/Data-Dumper/t/dumper.t
index acec138947..021a3f5c1f 100644
--- a/dist/Data-Dumper/t/dumper.t
+++ b/dist/Data-Dumper/t/dumper.t
@@ -15,7 +15,7 @@ $Data::Dumper::Sortkeys = 1;
$Data::Dumper::Pad = "#";
my $XS;
-my $TMAX = 486;
+my $TMAX = 492;
my $WANT = '';
# Force Data::Dumper::Dump to use perl. We test Dumpxs explicitly by calling
@@ -1043,7 +1043,7 @@ EOT
#############
##
- $WANT = <<'EOT';
+ my $want = <<'EOT';
#$VAR1 = {
# foo => sub {
# use warnings;
@@ -1053,10 +1053,11 @@ EOT
EOT
if(" $Config{'extensions'} " !~ m[ B ]) {
- SKIP_TEST "Perl configured without B module";
+ SKIP_BOTH("Perl configured without B module");
} else {
- TEST (q(Data::Dumper->new([{ foo => sub { print "foo"; } }])->Dump),
- 'Deparse 1: Indent 2; Dump()');
+ TEST_BOTH(q(Data::Dumper->new([{ foo => sub { print "foo"; } }])->Dumpxs),
+ 'Deparse 1: Indent 2; Dumpxs()',
+ $want);
}
}
@@ -1490,12 +1491,14 @@ EOT
#############
# Make sure $obj->Dumpxs returns the right thing in list context. This was
# broken by the initial attempt to fix [perl #74170].
-$WANT = <<'EOT';
+{
+ my $want = <<'EOT';
#$VAR1 = [];
EOT
-TEST q(join " ", new Data::Dumper [[]],[] =>->Dumpxs),
- '$obj->Dumpxs in list context'
- if $XS;
+ TEST_BOTH(q(join " ", new Data::Dumper [[]],[] =>->Dumpxs),
+ '$obj->Dumpxs in list context',
+ $want);
+}
#############
{