From f9757a510d28a063aaf6e6503efaeb09604b2c96 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Mon, 25 Jul 2022 09:52:40 +0100 Subject: [PATCH] PathTools/t/cwd_enoent.t: a fixup to version check v5.37.1-202-g0d6ab5e425 just added a version check for dragonfly; however, it generates sprintf warnings unless the OS's version has exactly two numeric components. The fix is trivial. --- dist/PathTools/t/cwd_enoent.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/PathTools/t/cwd_enoent.t b/dist/PathTools/t/cwd_enoent.t index 004d8d26d76d..61a566e856d7 100644 --- a/dist/PathTools/t/cwd_enoent.t +++ b/dist/PathTools/t/cwd_enoent.t @@ -28,7 +28,8 @@ foreach my $type (qw(regular perl)) { # https://github.com/Perl/perl5/issues/16525 # https://bugs.dragonflybsd.org/issues/3250 - my $osver = sprintf("%d%03d", ($Config{osvers} =~ /(\d+)/g)); + my @vlist = ($Config{osvers} =~ /(\d+)/g); + my $osver = sprintf("%d%03d", map { defined ? $_ : '0' } @vlist[0,1]); skip "getcwd() doesn't fail on non-existent directories on this platform", 4 if $type eq 'regular' && $^O eq 'dragonfly' && $osver < 6002;