On VMS, there is an additional warning that causes the warning of
interest to be lost and the test to fail. So append each warning
as we see it and then we'll find the access warning we're testing
for as long as it's in there somewhere.
for my $op (split //, "rwxRXW") {
# these should all warn with filetest access
my $w;
- local $SIG{__WARN__} = sub { $w = shift };
+ local $SIG{__WARN__} = sub { $w .= shift };
eval "-$op \$stat";
like($w, qr/^File::stat ignores use filetest 'access'/,
"-$op produced the right warning under use filetest 'access'");