From: Father Chrysostomos Date: Sat, 31 Aug 2013 13:44:12 +0000 (-0700) Subject: test.pl:runperl: more portability warnings X-Git-Tag: v5.19.4~317 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/ecadf9b7005812a5eb20b351ef9bcd042c7e3daf test.pl:runperl: more portability warnings VMS treats initial < > | 2> and trailing & as special in command line arguments, so we should avoid them in tests. --- diff --git a/t/test.pl b/t/test.pl index c452c38..cdd72ea 100644 --- a/t/test.pl +++ b/t/test.pl @@ -606,8 +606,16 @@ sub _create_runperl { # Create the string to qx in runperl(). die "test.pl:runperl(): 'progs' must be an ARRAYREF " . _where() unless ref $args{progs} eq "ARRAY"; foreach my $prog (@{$args{progs}}) { - if ($prog =~ tr/'"// && !$args{non_portable}) { - warn "quotes in prog >>$prog<< are not portable"; + if (!$args{non_portable}) { + if ($prog =~ tr/'"//) { + warn "quotes in prog >>$prog<< are not portable"; + } + if ($prog =~ /^([<>|]|2>)/) { + warn "Initial $1 in prog >>$prog<< is not portable"; + } + if ($prog =~ /&\z/) { + warn "Trailing & in prog >>$prog<< is not portable"; + } } if ($is_mswin || $is_netware || $is_vms) { $runperl = $runperl . qq ( -e "$prog" );