develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [PATCH 5.8.2 @21574] make tests relocatable

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
November 13, 2003 13:32
Subject:
Re: [PATCH 5.8.2 @21574] make tests relocatable
Message ID:
20031113213231.GB10108@math.berkeley.edu
On Thu, Nov 13, 2003 at 09:21:38PM +0000, Alan Burlison wrote:
> Shouldn't the entire BEGIN block just be ripped out from all the tests 
> rather than being modified?  According to TestInit.pm:
> 
> # This is a replacement for the old BEGIN preamble which heads (or
> # should head) up every core test program to prepare it for running.
> # Now instead of:
> #
> # BEGIN {
> #   chdir 't' if -d 't';
> #   @INC = '../lib';
> # }
> #
> # t/TEST will use -MTestInit.  You may "use TestInit" in the test
> # programs but it is not required.

It is crucial that an individual test can be run without the
intervention of TEST:

  ./perl t/op/stat.t

to provide as small "Perl-related environment" as possible.  E.g.,
consider line-ending bugs;  if

  ./perl t/TEST op/stat.t

fails, I do not know whether I should debug t/TEST, or t/op/stat.t.

Hope this helps,
Ilya

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About