This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert change #31489.
[perl5.git] / t / test.pl
index 495a93d..37e6682 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -274,9 +274,10 @@ sub like_yn ($$$@) {
     $pass = $got !~ /$expected/ if $flip;
     unless ($pass) {
        unshift(@mess, "#      got '$got'\n",
-               "# expected /$expected/\n");
+               $flip
+               ? "# expected !~ /$expected/\n" : "# expected /$expected/\n");
     }
-    local $Level = 2;
+    local $Level = $Level + 1;
     _ok($pass, _where(), $name, @mess);
 }
 
@@ -523,10 +524,11 @@ sub runperl {
        my @keys = grep {exists $ENV{$_}} qw(CDPATH IFS ENV BASH_ENV);
        local @ENV{@keys} = ();
        # Untaint, plus take out . and empty string:
+       local $ENV{'DCL$PATH'} = $1 if $is_vms && ($ENV{'DCL$PATH'} =~ /(.*)/s);
        $ENV{PATH} =~ /(.*)/s;
        local $ENV{PATH} =
            join $sep, grep { $_ ne "" and $_ ne "." and
-               ($is_mswin or !(stat && (stat _)[2]&0022)) }
+               ($is_mswin or $is_vms or !(stat && (stat _)[2]&0022)) }
                    split quotemeta ($sep), $1;
 
        $runperl =~ /(.*)/s;