On Fri, Jan 11, 2002 at 05:35:04PM +0200, Jarkko Hietaniemi wrote:
> On Fri, Jan 11, 2002 at 05:31:49PM +0200, Jarkko Hietaniemi wrote:
> > On Fri, Jan 11, 2002 at 05:18:10PM +0200, Jarkko Hietaniemi wrote:
> > > > PS  There was also a bug in runperl().  All switches were being lost.
> > > 
> > > Well, this change made several tests (like run/switches) to barf.
> > > So I backed out that hunk.
> > 
> > Urk, so now three of kill_perl tests tests are failing...
> > this is like quicksand.
> 
> Okay, this seems to keep all happy:
> 
> -       _quote_args(\$runperl, $args{switches});
> +       _quote_args(\$runperl,
> +                   ref $args{switches} ? $args{switches} : [$args{switches}]);

This is all my mistake.  I misinterpreted the runperl() docs.

# Arguments :
#   switches => [ command-line switches ]

switches takes an array ref.  It was fine the way it was, t/run/kill_perl.t 
was calling runperl() wrong.  Patch below.


> A propos, something is quoting octothorpes quite eagerly:
> 
> ok 76 - kill_perl - \# Bug 20010515.004

Yes, that's inside _ok() in t/test.pl.  It has to do that else the
test name might interfere with "# todo" and "# skip".  Actually, I
don't think t/TEST honors escaped # so its sort of moot in t/test.pl.


--- t/run/kill_perl.t   2002/01/11 21:39:17     1.1
+++ t/run/kill_perl.t   2002/01/11 21:39:21
@@ -52,7 +52,7 @@
 
     my($prog,$expected) = split(/\nEXPECT\n/, $raw_prog);
 
-    kill_perl($prog, $expected, { switches => $switch }, $name);
+    kill_perl($prog, $expected, { switches => [$switch] }, $name);
 }
 
 __END__
--- t/test.pl   2002/01/11 21:38:32     1.1
+++ t/test.pl   2002/01/11 21:38:55
@@ -280,8 +280,7 @@
     my %args = @_;
     my $runperl = $^X;
     if ($args{switches}) {
-       _quote_args(\$runperl,
-                   ref $args{switches} ? $args{switches} : [$args{switches}]);
+       _quote_args(\$runperl, $args{switches});
     }
     unless ($args{nolib}) {
        if ($is_macos) {



-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
slick and shiny crust
over my hairy anus
constipation sucks
        -- Ken Flagg

Reply via email to