This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Accumulate access warnings in stat.t.
authorCraig A. Berry <craigberry@mac.com>
Fri, 25 May 2012 16:29:05 +0000 (11:29 -0500)
committerCraig A. Berry <craigberry@mac.com>
Fri, 25 May 2012 16:29:05 +0000 (11:29 -0500)
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.

lib/File/stat.t

index 50981c6..78d57d8 100644 (file)
@@ -144,7 +144,7 @@ SKIP: {
     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'");