Skip to content

Commit 3e69d0f

Browse files
1-1samkhwilliamson
authored andcommitted
Add todo test for GH 21827 (localtime(HUGEVAL) reports wrong number)
This commit adds a todo test for GH 21827, which tests that localtime reports the correct value when given too large of a time as argument. This behavior still appears to be broken.
1 parent 4767b6c commit 3e69d0f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/run/todo.t

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,16 @@ TODO: {
384384
is($deferred, 1, 'defer in single-expression do block runs when exiting block; GH 20491');
385385
}
386386

387+
TODO: {
388+
local $::TODO = 'GH 21827';
389+
my $test = 18446744073709550592;
390+
warnings_like(
391+
sub { localtime $test },
392+
[ (qr/localtime\($test\)/) x 2 ],
393+
'localtime() warning reports correct value when given too large of a number; GH 21827'
394+
);
395+
}
396+
387397
TODO: {
388398
todo_skip 1 if is_miniperl();
389399
local $::TODO = 'GH 22168';

0 commit comments

Comments
 (0)