Skip to content

Commit

Permalink
PathTools/t/cwd_enoent.t: a fixup to version check
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
iabyn committed Jul 25, 2022
1 parent b5df4e0 commit f9757a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dist/PathTools/t/cwd_enoent.t
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f9757a5

Please sign in to comment.