On Thu, Nov 13, 2003 at 01:32:32PM -0800, Ilya Zakharevich wrote: > 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. You can do ./perl -MTestInit op/stat.t I for one would be really happy if the ever expanding set of repeated code necessary at the top of dual-life module tests could be reduced. -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern/ Do not try comedy at home! Milk & Cheese are advanced experts! Attempts at comedy can be dangerously unfunny!Thread Previous | Thread Next