test.pl:runperl: more portability warnings
authorFather Chrysostomos <sprout@cpan.org>
Sat, 31 Aug 2013 13:44:12 +0000 (06:44 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 1 Sep 2013 18:32:07 +0000 (11:32 -0700)
VMS treats initial < > | 2> and trailing & as special in command
line arguments, so we should avoid them in tests.

t/test.pl

index c452c38..cdd72ea 100644 (file)
--- 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" );