From b84136c2f668c728eeb198f538809ab50728fc3b Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 23 Mar 2026 20:30:29 +1100 Subject: [PATCH] t: make basic.t test more robust Pass `date` a format for the date output. To check we can run a process we fork out and run `date` and check the output matches a regex. The regex expects something like this: 'Mon Mar 23 09:30:57 UTC 2026'. But the format date prints by default depends on the LANG environment variable. And when you work with a bunch of Australian's some are going to have LANG=en_AU.UTF-8 which produces a date like this: 'Mon 23 Mar 2026 20:30:07 AEDT' --- t/basic.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/basic.t b/t/basic.t index b7331566..a55692de 100644 --- a/t/basic.t +++ b/t/basic.t @@ -47,7 +47,7 @@ subtest 'run_process' => sub { : -x '/usr/bin/date' ? '/usr/bin/date' : die "This test requires either /bin/date or /usr/bin/date exist."; - my $f = $hub->run_process([ $date ]); + my $f = $hub->run_process([ $date, '+%a %b %e %I:%M:%S %p %Z %Y']); $f->on_done(sub ($ec, $stdout, $stderr) { $done = 1;