diff options
author | Craig A. Berry <craigberry@mac.com> | 2019-08-25 14:26:11 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2019-08-25 14:55:57 -0500 |
commit | 6e0fc9025db5865d3181fcac99d17efa4680df6c (patch) | |
tree | 593bb9f3c9345b849e0768fd2d4a37019259bad9 /ext/File-Find | |
parent | 8b4039846548684eda3376f80a4a5cb7a47ccc94 (diff) | |
download | perl-6e0fc9025db5865d3181fcac99d17efa4680df6c.tar.gz |
Make find.t work on VMS by trimming trailing dots.
For whatever reason, find.t uses a lot of filenames with no
extension for testing purposes, but on VMS there is no such thing
as a file with no extension, so, for example 'faba' is returned
as 'faba.' with the zero-length extension explicitly specified.
For comparison purposes we have to trim that trailing dot, and
there is code to do that sprinkled throughout the test; we just
hadn't (until now) added it for a couple of the more recent tests.
Diffstat (limited to 'ext/File-Find')
-rw-r--r-- | ext/File-Find/t/find.t | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/File-Find/t/find.t b/ext/File-Find/t/find.t index 0a7355296c..40d14db0c6 100644 --- a/ext/File-Find/t/find.t +++ b/ext/File-Find/t/find.t @@ -281,7 +281,9 @@ my %tb = map { $_ => 1 } @testing_basenames; { find( { - wanted => sub { ++$::count_tb if $tb{$_}; }, + wanted => sub { s#\.$## if ($^O eq 'VMS' && $_ ne '.'); + ++$::count_tb if $tb{$_}; + }, $bad_option => undef, }, File::Spec->curdir @@ -296,7 +298,9 @@ my %tb = map { $_ => 1 } @testing_basenames; { finddepth( { - wanted => sub { ++$::count_tb if $tb{$_}; }, + wanted => sub { s#\.$## if ($^O eq 'VMS' && $_ ne '.'); + ++$::count_tb if $tb{$_}; + }, $bad_option => undef, $second_bad_option => undef, }, |