diff options
author | David Mitchell <davem@iabyn.com> | 2022-07-25 09:52:40 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2022-07-25 09:52:40 +0100 |
commit | f9757a510d28a063aaf6e6503efaeb09604b2c96 (patch) | |
tree | b37ae41df8a1b37c17e0d5fe25b47682a1bf1013 /dist/PathTools | |
parent | b5df4e081edac26a6cbaaba4f88a107f863737ca (diff) | |
download | perl-f9757a510d28a063aaf6e6503efaeb09604b2c96.tar.gz |
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.
Diffstat (limited to 'dist/PathTools')
-rw-r--r-- | dist/PathTools/t/cwd_enoent.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dist/PathTools/t/cwd_enoent.t b/dist/PathTools/t/cwd_enoent.t index 004d8d26d7..61a566e856 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; |