Re: Reorganizing t/

2001-02-19 Thread Andrew Pimlott
On Sat, Feb 17, 2001 at 03:10:30PM -0500, [EMAIL PROTECTED] wrote: > Dangerous. Take Test.pm for instance. It expects certain tests to be > on certain lines because it reads back its own error messages. > > > Ok, two birds with one stone. Define t/TestSetup.pm as: > > chdir 't' if -d 't'

Re: Reorganizing t/

2001-02-19 Thread schwern
On Mon, Feb 19, 2001 at 10:40:22AM +, Tim Bunce wrote: > Back when I was an active p5p'er (rather than just watching from the > sidelines from time to time) I understood the plan was to have tests for > ext/Foo live in ext/Foo/t/*.t just like normal CPAN/MakeMaker modules. > > A perl 'make te

Re: Reorganizing t/

2001-02-19 Thread schwern
On Mon, Feb 19, 2001 at 01:33:05PM -0500, Andrew Pimlott wrote: > > And then have TEST run all tests with "perl -MTestSetup"! > > Be very careful--part of the goal is to make sure you don't get > settings from an installed perl, and the above could pull in > TestSetup from an installed perl. Tha

Re: Reorganizing t/

2001-02-19 Thread Jarkko Hietaniemi
On Mon, Feb 19, 2001 at 09:31:17AM -0500, Andy Dougherty wrote: > On Mon, 19 Feb 2001, Tim Bunce wrote: > > > Back when I was an active p5p'er (rather than just watching from the > > sidelines from time to time) I understood the plan was to have tests for > > ext/Foo live in ext/Foo/t/*.t just li

Re: Reorganizing t/

2001-02-19 Thread Andy Dougherty
On Mon, 19 Feb 2001, Tim Bunce wrote: > Back when I was an active p5p'er (rather than just watching from the > sidelines from time to time) I understood the plan was to have tests for > ext/Foo live in ext/Foo/t/*.t just like normal CPAN/MakeMaker modules. > > A perl 'make test' would run the pe

Re: Reorganizing t/

2001-02-19 Thread Tim Bunce
On Sat, Feb 17, 2001 at 04:44:38AM -0500, [EMAIL PROTECTED] wrote: > > t/lib/ should look something lib/. Instead of 't/lib/ansicolor.t' it > should be 't/lib/Term-ANSIColor.t' or perhaps > 't/lib/Term/ANSIColor.t'. For a module with multiple test files, it > would be (Test.pm as the example):

Re: Reorganizing t/

2001-02-18 Thread Jarkko Hietaniemi
On Sat, Feb 17, 2001 at 10:22:13AM -0600, Jarkko Hietaniemi wrote: > > One additional point to consider and solve is the BEGIN 'preamble' we > > now add to each test to make certain we are in a known directory, and > > more importantly, that we are running the tests using *the* lib/ of > > the Per

Re: Reorganizing t/

2001-02-18 Thread Jarkko Hietaniemi
> One additional point to consider and solve is the BEGIN 'preamble' we > now add to each test to make certain we are in a known directory, and > more importantly, that we are running the tests using *the* lib/ of > the Perl we are building and not some other lib. Having to add that > preamble ma

Re: Reorganizing t/

2001-02-18 Thread Jarkko Hietaniemi
> Fortunately, this is a fairly rote process. Unfortunately, its not > easily automatable since the current test naming scheme is > inconsistant. Also, some tests rely on their name being what it is. > No worries, though, this can be done as an incremental process. > > Thought... we might want

Re: Reorganizing t/

2001-02-17 Thread schwern
On Sat, Feb 17, 2001 at 07:49:37PM +, [EMAIL PROTECTED] wrote: > >A simpler idea would to alter t/TEST so that it runs the tests as > >"perl -I../lib". This isn't *quite* the same as @INC = '../lib', but > >it should be close enough. > > It isn't. More than once we have things "pass" for _us

Re: Reorganizing t/

2001-02-17 Thread nick
<[EMAIL PROTECTED]> writes: > >A simpler idea would to alter t/TEST so that it runs the tests as >"perl -I../lib". This isn't *quite* the same as @INC = '../lib', but >it should be close enough. It isn't. More than once we have things "pass" for _us_ 'cos we have perl already and test finds /us

Re: Reorganizing t/

2001-02-17 Thread schwern
On Sat, Feb 17, 2001 at 10:55:29AM -0600, Jarkko Hietaniemi wrote: > On Sat, Feb 17, 2001 at 10:22:13AM -0600, Jarkko Hietaniemi wrote: > > > One additional point to consider and solve is the BEGIN 'preamble' we > > > now add to each test to make certain we are in a known directory, and > > > more

Re: Reorganizing t/

2001-02-17 Thread Simon Cozens
On Sat, Feb 17, 2001 at 10:05:56AM -0800, Russ Allbery wrote: > As one of the people with modules both on CPAN and in core, I'd be happy > to put such a pre-amble on all of my tests in my module distribution if it > didn't interfere with people running make test from the module > distribution. I

Re: Reorganizing t/

2001-02-17 Thread Russ Allbery
Jarkko Hietaniemi <[EMAIL PROTECTED]> writes: > Looks good to me. > One additional point to consider and solve is the BEGIN 'preamble' we > now add to each test to make certain we are in a known directory, and > more importantly, that we are running the tests using *the* lib/ of the > Perl we ar

Reorganizing t/

2001-02-17 Thread schwern
Alot of the modules in the core have (or had) double lives on CPAN. Alot of the tests are enormous. And t/ is, in general, something of a mess. Part of the problem is its fairly flat directory structure. t/ is broken up into only a few subdirectories: base, cmd, comp, io, lib, op, pod, pragma.