Skip to content

Commit

Permalink
Provide defined value for $TODO only where test should not run.
Browse files Browse the repository at this point in the history
Some tests should not be run on older perls.  To indicate that, provide
an undef rather than a defined but false value.

This reflects Test::Builder synch with CPAN for upstream bug fix:
Test-More/test-more@9c269ff

Note that these should really be SKIPs rather than TODOs (but we can handle that later).
  • Loading branch information
jkeenan committed Jan 20, 2019
1 parent 6826002 commit 187a416
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions ext/Devel-Peek/t/Peek.t
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ do_test('reference to hash',
MAX = 7
Elt "123" HASH = $ADDR' . $c_pattern,
'',
$] < 5.015
&& 'The hash iterator used in dump.c sets the OOK flag');
($] < 5.015) ? 'The hash iterator used in dump.c sets the OOK flag' : undef);

do_test('reference to anon sub with empty prototype',
sub(){@_},
Expand Down Expand Up @@ -457,7 +456,7 @@ do_test('reference to blessed hash',
FILL = 0
MAX = 7', '',
$] >= 5.015
? 0
? undef
: 'The hash iterator used in dump.c sets the OOK flag');

do_test('typeglob',
Expand Down Expand Up @@ -535,7 +534,7 @@ do_test('reference to hash containing Unicode',
COW_REFCNT = 1 # $] < 5.019007
', '',
$] >= 5.015
? 0
? undef
: 'The hash iterator used in dump.c sets the OOK flag');
} else {
do_test('reference to hash containing Unicode',
Expand All @@ -562,7 +561,7 @@ do_test('reference to hash containing Unicode',
COW_REFCNT = 1 # $] < 5.019007
', '',
$] >= 5.015
? 0
? undef
: 'The hash iterator used in dump.c sets the OOK flag');
}

Expand Down Expand Up @@ -767,7 +766,7 @@ do_test('blessing to a class with embedded NUL characters',
FILL = 0
MAX = 7', '',
$] >= 5.015
? 0
? undef
: 'The hash iterator used in dump.c sets the OOK flag');

do_test('ENAME on a stash',
Expand Down Expand Up @@ -928,7 +927,7 @@ do_test('small hash after keys and scalar',

# Dump with arrays, hashes, and operator return values
@array = 1..3;
do_test('Dump @array', '@array', <<'ARRAY', '', '', 1);
do_test('Dump @array', '@array', <<'ARRAY', '', undef, 1);
SV = PVAV\($ADDR\) at $ADDR
REFCNT = 1
FLAGS = \(\)
Expand All @@ -953,7 +952,7 @@ SV = PVAV\($ADDR\) at $ADDR
IV = 3
ARRAY

do_test('Dump @array,1', '@array,1', <<'ARRAY', '', '', 1);
do_test('Dump @array,1', '@array,1', <<'ARRAY', '', undef, 1);
SV = PVAV\($ADDR\) at $ADDR
REFCNT = 1
FLAGS = \(\)
Expand All @@ -969,7 +968,7 @@ SV = PVAV\($ADDR\) at $ADDR
ARRAY

%hash = 1..2;
do_test('Dump %hash', '%hash', <<'HASH', '', '', 1);
do_test('Dump %hash', '%hash', <<'HASH', '', undef, 1);
SV = PVHV\($ADDR\) at $ADDR
REFCNT = 1
FLAGS = \(SHAREKEYS\)
Expand All @@ -986,7 +985,7 @@ SV = PVHV\($ADDR\) at $ADDR
HASH

$_ = "hello";
do_test('rvalue substr', 'substr $_, 1, 2', <<'SUBSTR', '', '', 1);
do_test('rvalue substr', 'substr $_, 1, 2', <<'SUBSTR', '', undef, 1);
SV = PV\($ADDR\) at $ADDR
REFCNT = 1
FLAGS = \(PADTMP,POK,pPOK\)
Expand Down

0 comments on commit 187a416

Please sign in to comment.