From 54a0ba941181ca34ec2bae5d3b74ccd651cc7b19 Mon Sep 17 00:00:00 2001 From: Samuel Young Date: Thu, 11 Sep 2025 16:08:47 -0500 Subject: [PATCH] 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. --- t/run/todo.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/run/todo.t b/t/run/todo.t index 561a0583a322..4ac67be0f909 100644 --- a/t/run/todo.t +++ b/t/run/todo.t @@ -384,6 +384,16 @@ TODO: { is($deferred, 1, 'defer in single-expression do block runs when exiting block; GH 20491'); } +TODO: { + local $::TODO = 'GH 21827'; + my $test = 18446744073709550592; + warnings_like( + sub { localtime $test }, + [ (qr/localtime\($test\)/) x 2 ], + 'localtime() warning reports correct value when given too large of a number; GH 21827' + ); +} + TODO: { todo_skip 1 if is_miniperl(); local $::TODO = 'GH 22168';