From ecadf9b7005812a5eb20b351ef9bcd042c7e3daf Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 31 Aug 2013 06:44:12 -0700 Subject: [PATCH] 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. --- t/test.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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" ); -- 2.7.4