Re: [PATCH] Test::More isa_ok function

2001-09-28 Thread Andrew Wilson

On Mon, Sep 24, 2001 at 08:40:15PM -0400, Michael G Schwern wrote:
> On Mon, Sep 24, 2001 at 06:23:58PM -0500, Dave Rolsky wrote:
> > The patch below allows you to supply your own test name for the isa_ok
> > function (I find the default insufficiently descriptive).  I'd like to do
> > the same for can_ok but I don't think that could be done without breaking
> > backwards compatibility.
> 
> What sort of names do you tend to throw in there?

I've just written a small logging module and I want ot do this

  isa_ok($lj, "BlackStar::LumberJack", "I'm a LumberJack and I'm ok");

This feature is essential ;-)

cheers

Andrew



Re: [PATCH] Test::More isa_ok function

2001-09-28 Thread Michael G Schwern

On Fri, Sep 28, 2001 at 05:22:16PM +0100, Andrew Wilson wrote:
> I've just written a small logging module and I want ot do this
> 
>   isa_ok($lj, "BlackStar::LumberJack", "I'm a LumberJack and I'm ok");
> 
> This feature is essential ;-)

Reimplementing the chop() function?


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]>   Kwalitee Is Job One
It sure is fun masturbating.
http://www.unamerican.com/



Essential Modules

2001-09-28 Thread Michael G Schwern

One of the best ways to pound 5.8 release candidates will be to run it
and 5.6.1 against heaps of CPAN modules and make sure that everything
which works on 5.6.1 works on 5.8.0.

In anticipation of this, I'd like to build a list of the modules that
you all use in your day to day programming.  This is the list of stuff
that Must Work and when the time comes for 5.8 release candidates we
can check them all out.  (Or you can start early).

Add your modules to the Wiki

http://www.pobox.com/~schwern/cgi-bin/perl-qa-wiki.cgi?EssentialModules

-- 

Michael G. Schwern   <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]>   Kwalitee Is Job One
Fuck with me and I will saw off your legs.
http://www.unamerican.com/



Archive::Tar, Archive::Zip and Compress::Zlib need help

2001-09-28 Thread Michael G Schwern

Archive::Tar and Archive::Zip are very essential modules.  You use
them every time you run the CPAN shell.  However, their implementation
could use a little work and the authors could use a little help.

In all cases the need better tests, clearer docs, tutorials and a
general cleanup of the code.  If anyone is seriously interested in
helping out the authors, please contact them.  Or better yet, surprise
them with a patch!

Archive::TarStephen Zander  <[EMAIL PROTECTED]>
Archive::ZipNed Konz<[EMAIL PROTECTED]>


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]>   Kwalitee Is Job One



Re: Starting with a test > 1

2001-09-28 Thread Piers Cawley

Dave Rolsky <[EMAIL PROTECTED]> writes:

> For my Alzabo tests, I do some weird stuff involving forking off processes
> during tests and running the same (basically same) set of tests multiple
> times, each time with different modules loaded.  The parent process
> calculates how many tests will be involved in each run and how many runs
> will occur to print the '1..?' stuff at the beginning.
> 
> As part of this, I need to be able to tell the forked process to start its
> test count at a certain number (greater than 1).
> 
> There's no way to do this with Test::Simple currently.  What I need is to
> be able to set $Planned_Tests and $Num_Tests without print the "1..$x" bit
> again.
> 
> Either that or set a $Offset so that when it prints the test number it
> prints $Num_Tests + $Offset.

If it's not a dumb question, why are you doing it that way? If you
were using PerlUnit, aka Test::Unit::TestCase, you could do something
like:

package ParentTest;

use base 'Test::Unit::TestCase';

sub setup {
...
}


sub test_foo {
...
}


Then simply inherit from it for each different set of tests.


package DerivedTest;

use base 'ParentTest';

use SomeModule;

Then your /t would have files like:


derived.t:
use Test::Unit::HarnessUnit;
Test::Unit::HarnessUnit->new->start('DerivedTest');

which could be programmatically generated.

Thinking about it, you could probably move the module loads into the
test scripts and have them just run the basic test, which would, in
turn, probably mean you could get away with just using Test::More/Simple



-- 
Piers Cawley
www.iterative-software.com




Test::Harness 2.00_01 alpha

2001-09-28 Thread Michael G Schwern

A new version of the Test::Harness 2.00 alpha just went up.  This has
some small revisions to the Straps interface and integrates some bug
fixes from the mainline.

My major concern is that it get used, especially on non-Unixen.  If
someone has a Win32 box, give it a shot.


http://www.pobox.com/~schwern/src/Test-Harness-2.00_01.tar.gz

-- 

Michael G. Schwern   <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]>   Kwalitee Is Job One
Don't treat people this way!  Milk & Cheese are indestructible!  You are not!