summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/test.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/test.pl b/t/test.pl
index a35eb83693..e2edccb4f8 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -412,6 +412,12 @@ sub _create_runperl { # Create the string to qx in runperl().
}
} elsif (defined $args{progfile}) {
$runperl .= qq( "$args{progfile}");
+ } else {
+ # You probaby didn't want to be sucking in from the upstream stdin
+ die "test.pl:runperl(): none of prog, progs, progfile, args, "
+ . " switches or stdin specified"
+ unless defined $args{args} or defined $args{switches}
+ or defined $args{stdin};
}
if (defined $args{stdin}) {
# so we don't try to put literal newlines and crs onto the
@@ -455,6 +461,8 @@ sub _create_runperl { # Create the string to qx in runperl().
}
sub runperl {
+ die "test.pl:runperl() does not take a hashref"
+ if ref $_[0] and ref $_[0] eq 'HASH';
my $runperl = &_create_runperl;
my $result = `$runperl`;
$result =~ s/\n\n/\n/ if $is_vms; # XXX pipes sometimes double these