Tels <[EMAIL PROTECTED]> writes:

>> But this really is just a bug in the TEST script. I'd recommend a
>> patch like this. The first chunk is just to make an overlong line
>> shorter, the second chunk is the real fix. All tests pass on my linux.
>> And even Tels' original test script passes all tests.
>
> Actually, I think my original version *should* fail, because the extra output 
> is clearly not what I had in mind (I just forgot to remove it - as usual :).
>
> Or at least it should warn something like "extra output seen from testscript". 

Jarkko Hietaniemi <[EMAIL PROTECTED]> writes:

>> >       Comment out some debugging output in Math::BigInt, that
>> >       causes confusion in t/TEST when running Math/BigInt/t/bare_mbi.t.
>> 
>> But this really is just a bug in the TEST script. I'd recommend a
>> patch like this. The first chunk is just to make an overlong line
>> shorter, the second chunk is the real fix. All tests pass on my linux.
>> And even Tels' original test script passes all tests.
>
> Hmmm, I dunno.  In general I would say tests should not produce extra
> output unless they mean to fail.  Or in other words, the test
> harnesses should not be too forgiving.  Or they may output using
> some known "out of band" channel, like lines matching ^/#/.

Okay, okay, okay:-) But I hope you all agree, the failure *mode* was
unacceptable. If they prefer to be picky, they're obliged to declare
what's up.

Reworked patch appended, but I do not like that one. make test now
dies after several minutes from a fart.

Feel free to modify to the better. Also note: patching harness left as
an exercise to the reader:-)

-- 
andreas

--- [EMAIL PROTECTED]/t/TEST    2003-07-05 05:07:01.000000000 +0200
+++ [EMAIL PROTECTED]/t/TEST    2003-07-05 17:21:16.000000000 +0200
@@ -238,7 +238,12 @@
        elsif ($type eq 'perl') {
            my $perl = $ENV{PERL} || './perl';
            my $redir = ($^O eq 'VMS' ? '2>&1' : '');
-           my $run = "$perl" . _quote_args("$testswitch $switch $utf") . " $test 
$redir|";
+           my $run = sprintf("%s%s %s %s|",
+                              $perl,
+                              _quote_args("$testswitch $switch $utf"),
+                              $test,
+                              $redir,
+                             );
            open(RESULTS,$run) or print "can't run '$run': $!.\n";
        }
        else {
@@ -310,7 +315,7 @@
                         die "FAILED--Further testing stopped" . ($1 ? ": $1\n" : 
".\n");
                    }
                    else {
-                       $ok = 0;
+                        die "extra output seen from testscript: $_";
                    }
                }
            }

Reply via email to