[PATCH] circular data structures in Test::More

2003-03-03 Thread Fergal Daly
This patch lets Test::More compare circular data structures. Get the latest version (0.47) of Test::More, apply fixes.patch to fix some issues, then apply circular.patch. Test with circular.t, F -- Do you need someone with lots of Unix sysadmin and/or lots of OO software development

Problem with Test::More and Does Not Exist

2003-03-03 Thread Fergal Daly
perl -MTest::More=no_plan -e 'is_deeply({}, {key => []})' should fail but doesn't because $DNE is deeply equal to [] and _deep_check doesn't notice the class difference. Patch attached. F -- Do you need someone with lots of Unix sysadmin and/or lots of OO software development experience? Go

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-28 Thread Adrian Howard
True. I usually expose "deep" objects by methods rather than hash access, so it's not really a problem for the majority of my code. Adrian On Friday, February 28, 2003, at 03:54 pm, [EMAIL PROTECTED] wrote: On Fri, Feb 28, 2003 at 11:51:07AM +, Adrian Howard wrote: Option three. isa_ok

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-28 Thread schwern
On Fri, Feb 28, 2003 at 11:51:07AM +, Adrian Howard wrote: > Option three. > >isa_ok($obj, 'MyClass'); >is_deeply($obj, { foo => 42, bar => 23 }); This is, unfortunately, shallow. It won't compare objects inside $obj.

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-28 Thread Adrian Howard
programming in general), I reckon in the context of test suites it's a bug. I am already not yet convinced. In particular, it makes this sort of test more difficult than it needs be: is_deeply($obj, { foo => 42, bar => 23 }); Absolutely, but there is currently no way to do this is_deeply(

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-28 Thread Adrian Howard
I'd go for feature, not bug. For me is_deeply has always been for testing structure. We have isa_ok for checking class identity. Having one that tested for both might be useful, but I would not change the behaviour of is_deeply. Adrian On Thursday, February 27, 2003, at 05:32 pm, Fergal Daly

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-28 Thread schwern
On Thu, Feb 27, 2003 at 10:03:50PM +, Fergal Daly wrote: > > > - let _deep_check take it's cue from the second argument. If the second > > > argument is blessed then be strict about the classes, if it's unblessed > > > then ignore the classes. This should happen at all levels in the > > > stru

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-28 Thread schwern
On Thu, Feb 27, 2003 at 09:21:09PM +, Fergal Daly wrote: > > I am already not yet convinced. In particular, it makes this sort of test > > more difficult than it needs be: > > > > is_deeply($obj, { foo => 42, bar => 23 }); > > Absolutely, but

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-28 Thread schwern
particular, it makes this sort of test more difficult than it needs be: is_deeply($obj, { foo => 42, bar => 23 });

One more Test::More problem

2003-02-27 Thread Fergal Daly
ed or whatever. use Test::More; for(1..10) { eq_array( [[]], [{}] ) } print join(", ", @Test::More::Data_Stack)."\n"; The solution is to make eq_array and eq_hash wrappers around the original functions. This is needed for the circular structures patch anyway. Actually, I

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-27 Thread Fergal Daly
On Thursday 27 February 2003 22:03, Fergal Daly wrote: > Would it be acceptable to add a third argument to _deep_check to switch > on/off bless checking, rather than having to reimplement the whole thing? Below is a very simple patch to do that. That makes cmp_object very easy F -- Do you need

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-27 Thread Fergal Daly
On Thursday 27 February 2003 21:35, [EMAIL PROTECTED] wrote: > On Thu, Feb 27, 2003 at 09:21:09PM +, Fergal Daly wrote: > > Or even better, cmp_objects(). Yep, sounds better. > > - let _deep_check take it's cue from the second argument. If the second > > argument is blessed then be strict ab

Re: Test::More::is_deeply problems with blessings and stringified refs

2003-02-27 Thread Fergal Daly
ontext of test suites it's a bug. > > I am already not yet convinced. In particular, it makes this sort of test > more difficult than it needs be: > > is_deeply($obj, { foo => 42, bar => 23 }); Absolutely, but there is currently no way to do this is_deeply($obj, bl

Test::More diagostics problem

2003-02-27 Thread Fergal Daly
There's a line missing from Test::More::_deep_check(). It results in funny diagnostics after comparing scalar refs, so perl -MTest::More=no_plan -e 'is_deeply([(\"a") x 5, "b"], [(\"a") x 5, "c"])' gives # Structures begin

Test::More::is_deeply problems with blessings and stringified refs

2003-02-27 Thread Fergal Daly
On Thursday 27 February 2003 16:40, [EMAIL PROTECTED] wrote: > > is_deeply() ignores the classes of blessed refs. So > > > > perl -MTest::More=no_plan -e 'is_deeply(bless([], "a"), bless([], "b"))' > > > > passes, > > Oh. Not sure if that's a bug or a feature. Discuss it on perl-qa. I think that

Re: Removing CPAN's dependency on Test::More

2002-11-12 Thread Michael G Schwern
On Wed, Nov 13, 2002 at 11:32:21AM +1100, Ken Williams wrote: > So why does CPAN.pm depend on Test::More anyway? It only uses > it during its 'make test' phase, not during runtime operations. > And when you can't install modules very easily because you don't &g

Removing CPAN's dependency on Test::More

2002-11-12 Thread Ken Williams
Hi, Twice recently, I've just been through the task of upgrading CPAN.pm from 1.59_54 to 1.63 on a solaris system because something about MD5 was broken enough that no modules could be installed. It took a long time to do manually, because of the dependency on Test::More, which depen

Re: callbacks at the end of Test::More ?

2002-11-12 Thread Adrian Howard
On Saturday, October 26, 2002, at 04:22 pm, Nicholas Clark wrote: [snip] However, I'd like to be able to cleanly print out my random number seed to STDERR (or whatever Test::Builder's correct name for this is) if it believes that any tests have failed, and I can't see a clean way to do this. Whe

Re: callbacks at the end of Test::More ?

2002-11-07 Thread Nicholas Clark
r this is) if it believes > > that any tests have failed, and I can't see a clean way to do this. > > In an END block, grab the T::B object and check the summary(). > > #!/usr/bin/perl -w > > use Test::More tests => 1; > > pass('foo');

Re: callbacks at the end of Test::More ?

2002-11-06 Thread Michael G Schwern
n way to do this. In an END block, grab the T::B object and check the summary(). #!/usr/bin/perl -w use Test::More tests => 1; pass('foo'); END { my $failed = grep!$_, Test::More->builder->summary; diag $failed ? "Failed\n" : "Passed\n&quo

callbacks at the end of Test::More ?

2002-10-26 Thread Nicholas Clark
I'm intending to write a module to work with Test::More to provide repeatable "random" tests (ie take advantage of the pseudo random nature of rand). I discussed it with Schwern at YAPC::EU and he thinks it will work. However, I'd like to be able to cleanly print out my r

Re: Test::More

2002-09-30 Thread Michael G Schwern
On Mon, Sep 30, 2002 at 09:12:14AM +0200, H.Merijn Brand wrote: > use_ok ("Test::More"); > is ($Test::More::VERSION, 0.47, "Test::More version check"); > > ain't quite the same either. > Some of my tests indeed *require* a certain version of some:

Re: Test::More

2002-09-29 Thread H.Merijn Brand
On Sat 28 Sep 2002 03:25, Michael G Schwern <[EMAIL PROTECTED]> wrote: > On Tue, Sep 24, 2002 at 05:57:41PM +0200, H.Merijn Brand wrote: > > 1. use_ok should have an entry in the manual for minimal version > > > > use_ok ("Test::More", 0.47); > &

Re: Test::More

2002-09-27 Thread Michael G Schwern
On Tue, Sep 24, 2002 at 05:57:41PM +0200, H.Merijn Brand wrote: > 1. use_ok should have an entry in the manual for minimal version > > use_ok ("Test::More", 0.47); This currently doesn't work quite right. Observe... $ perl -MTest::More -wle 'plan tests

Re: Test::More

2002-09-24 Thread Abe Timmerman
Op een mooie herfstdag (Tuesday 24 September 2002 17:57), schreef H.Merijn Brand: > 2. I'm testing conversions to and from Unicode > > --8<--- > use Test::More tests => 86; > > use strict; > > BEGIN { > use_ok ("PROCURA::Diac", 4.12); >

Test::More

2002-09-24 Thread H.Merijn Brand
1. use_ok should have an entry in the manual for minimal version use_ok ("Test::More", 0.47); 2. I'm testing conversions to and from Unicode --8<--- use Test::More tests => 86; use strict; BEGIN { use_ok ("PROCURA::Diac", 4.12); SKIP: {

Re: Test::More::can_ok when using AutoLoader

2002-09-02 Thread Michael G Schwern
On Sat, Aug 31, 2002 at 02:05:53PM +0200, Elizabeth Mattijsen wrote: > >$ perl -Mblib -wle 'use AutoExample; print "Yes" if > >AutoExample->can("foo")' > >Using /home/schwern/tmp/AutoExample/blib > >Yes > > Hmmm... I'm doing BEGIN { use_ok( 'Thread::Pool' ) }... Maybe there is a > difference

Re: Test::More::can_ok when using AutoLoader

2002-08-31 Thread Elizabeth Mattijsen
At 02:38 PM 8/30/02 -0700, Michael G Schwern wrote: >On Fri, Aug 30, 2002 at 04:01:11PM +0200, Elizabeth Mattijsen wrote: > > Is there an easy way to check methods, whose loading is deferred with > > AutoLoader, with the can_ok() check? >Nope. You have to create stubs. The AutoLoader module shou

Re: Test::More::can_ok when using AutoLoader

2002-08-30 Thread Michael G Schwern
On Fri, Aug 30, 2002 at 04:01:11PM +0200, Elizabeth Mattijsen wrote: > Is there an easy way to check methods, whose loading is deferred with > AutoLoader, with the can_ok() check? Nope. You have to create stubs. The AutoLoader module should do this automatically for you assuming you've gone th

Test::More::can_ok when using AutoLoader

2002-08-30 Thread Elizabeth Mattijsen
Is there an easy way to check methods, whose loading is deferred with AutoLoader, with the can_ok() check? Or would some magic need to be added to AutoLoader.pm? Currently, you get an error that the subroutines do not exist. Liz

Re: [PATCH Test::More] Allow isa_ok( $classname, $parent )

2002-07-06 Thread Andy Lester
> The purpose of isa_ok() is two fold: > > Check that a scalar contains an object > Check that object is of the right class I've recently started using it for more than constructors. Here's a patch to the docs to encourage this: Thanks, xoxo, Andy --- More.pm Sat Jul 6 22:57:13

Re: [PATCH Test::More] Allow isa_ok( $classname, $parent )

2002-07-06 Thread Michael G Schwern
On Sat, Jul 06, 2002 at 06:57:27PM -0700, chromatic wrote: > My test was: > > use_ok( 'Child::Class' ); > isa_ok( 'Child::Class', 'Parent::Class' ); > > I could just as easily check @Child::Class::ISA or use UNIVERSAL::isa(). Child::Class->isa('Parent::Class') -- This sig file te

Re: [PATCH Test::More] Allow isa_ok( $classname, $parent )

2002-07-06 Thread chromatic
On Saturday 06 July 2002 18:41, Michael G Schwern wrote: > The purpose of isa_ok() is two fold: > Check that a scalar contains an object > Check that object is of the right class > and it only exists because it's a very common test and you have to do the > above in several steps to get

Re: [PATCH Test::More] Allow isa_ok( $classname, $parent )

2002-07-06 Thread Michael G Schwern
On Sun, Jun 30, 2002 at 05:37:14PM -0700, chromatic wrote: > Here's a patch to the Test::Simple 0.45 distribution to make isa_ok() work with > class names, not just objects. It tries to respect custom isa() methods, as > well. The purpose of isa_ok() is two fold: Check that a scalar contain

[PATCH Test::More] Allow isa_ok( $classname, $parent )

2002-06-30 Thread chromatic
a reference or a class"; + } } else { # We can't use UNIVERSAL::isa because we want to honor isa() overrides diff -ur Test-Simple-0.45.old/t/More.t Test-Simple-0.45/t/More.t --- Test-Simple-0.45.old/t/More.t Sat Apr 20 17:34:40 2002 +++ Test-Simpl

Re: [PATCH] Make Test::More::can_ok() use objects, not just classes

2002-04-20 Thread Michael G Schwern
On Sat, Apr 20, 2002 at 11:51:30AM -0700, chromatic wrote: > Attached is a patch to make Test::More do the right thing (as I see it) in this > case. Previously, it called can() on the class name, which obviously doesn't > work here. You're right. > I suspect something

[PATCH] Make Test::More::can_ok() use objects, not just classes

2002-04-20 Thread chromatic
sub can { my ($self, $sub) = @_; return exists $self->{_subs}{$sub}; } Attached is a patch to make Test::More do the right thing (as I see it) in this case. Previously, it called can() on the class name, which obviously doesn't work here. I suspect

Re: Test::Builder and Test::More change requests

2002-04-04 Thread Mark Fowler
On Thu, 4 Apr 2002, Michael G Schwern wrote: > I'd encourage you to write a Test::Builder based module that does more > complete set & complex data testing. Either talk to Barrie about > adding it to Test::Differences or start a new module. Test::Set, > Test::Data::Deep, etc... But but I've al

Re: Test::Builder and Test::More change requests

2002-04-04 Thread Michael G Schwern
uot;&& 0" at the end to ensure that > the method returns the correct truth (otherwise is_reversed will return > true no matter what is called) Sensible. Done. If anyone asks, it's your fault. > Secondly, I was wondering about eq_set in Test::More. > > ok(e

Test::Builder and Test::More change requests

2002-04-04 Thread Mark Fowler
reverse of '$_[0]' is '".reversed($_[0]). "' not '$_[1]' as expected") } rather than having to do the horrible "&& 0" at the end to ensure that the method returns the correct truth (otherwise is_reversed will return

Re: Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Michael G Schwern
e code I have > elsewhere, it isn't generalized to handle all data structures. > > > Mind if I steal it? :) > > Not at all, but you'll need to steal Algortihm::Diff (and, for the > moment, Text::Diff, but I want to remove that necessity). In that case, since it plays ni

Re: Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Barrie Slaymaker
Mind if I steal it? :) Not at all, but you'll need to steal Algortihm::Diff (and, for the moment, Text::Diff, but I want to remove that necessity). > > I would like to make Test::Differences autodetect Test::More and others > > like it so it can extend them "seamlessly&quo

Re: Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Michael G Schwern
s, or arrays of > arrays of strings (basically, all the result types DBI's fetchall_...() > methods can return plus whole strings). Oooh, pretty. Beats the hell out of is_deeply. Mind if I steal it? :) > I would like to make Test::Differences autodetect Test::More and oth

Proper way to build a mix-in library for Test::More?

2001-12-12 Thread Barrie Slaymaker
ould like to make Test::Differences autodetect Test::More and others like it so it can extend them "seamlessly" like so: use Test::More ; use Test::Differences ; plan tests => 10 ; is "a", "a" ; is_or_diff \@Got1, \@Expected1, "test 2" ;

Re: Test::More::diag()

2001-12-10 Thread Michael G Schwern
On Mon, Dec 10, 2001 at 11:19:21PM +, Adrian Howard wrote: > > I'm planning on using diag(). > > > > ok( $foo == $bar ) || diag 'blah blah'; > > > > it has nice mnemonics with: > > > > open(FOO, "bar") || die 'blah blah'; > > > > "ok or diag" "open or die" > > > > Thoughts? > > Little to

Re: Test::More::diag()

2001-12-10 Thread Adrian Howard
Hi, Newbie with Test::More --- and loving it :-) on 10/12/01 12:04 pm, Michael G Schwern at [EMAIL PROTECTED] wrote: > Its been on the Test::More todo list to have a blessed way to do: > > print STDOUT "# here's some extra info\n"; > > I'm planning on

Test::More::diag()

2001-12-10 Thread Michael G Schwern
Its been on the Test::More todo list to have a blessed way to do: print STDOUT "# here's some extra info\n"; I'm planning on using diag(). ok( $foo == $bar ) || diag 'blah blah'; it has nice mnemonics with: open(FOO, "bar") || die

Re: Test::More and WWW::Chat fighting over fail()

2001-10-22 Thread Richard Clamp
or $dayjob and can offer this as a possible workaround to get multiple WebChat subs. #!perl -w use strict; use Test::More tests => 2; use TestConfig; use Inline 'WebChat' => < <

Re: Test::More and WWW::Chat fighting over fail()

2001-10-17 Thread Simon Wistow
On Sun, Oct 07, 2001 at 07:06:45PM -0400, Michael G Schwern said: > > Both Test::More and WWW::Chat export a routine called fail(). This > > makes it rather hard to write tests for web stuff using both these > > modules. > > I can solve this from my end by providing c

Re: testing web foo with Test::More

2001-10-09 Thread Kirrily 'Skud' Robert
On Tue, Oct 09, 2001 at 09:17:06AM -0400, Shane Landrum wrote: | On Sun, Oct 07, 2001 at 03:30:58PM -0400, Kirrily 'Skud' Robert ([EMAIL PROTECTED]) |wrote: | > OK, I've been putting off figuring this out for ages, but here it is: | | | | Another way to accomplish the same thing, that I hacked

Re: testing web foo with Test::More

2001-10-09 Thread Shane Landrum
otected web gadget: ---- use strict; use Test::More qw(no_plan); use LWP::Simple; my $WEB_SYSTEM = 'foo.bar.com'; my $USERNAME = 'foo'; my $PASSWORD = 'bar'; use LWP::UserAgent; # We make our own specialization of LWP::UserAg

Re: Test::More and WWW::Chat fighting over fail()

2001-10-08 Thread Simon Wistow
On Sun, Oct 07, 2001 at 07:06:45PM -0400, Michael G Schwern said: > On Sun, Oct 07, 2001 at 03:57:48PM -0400, Kirrily 'Skud' Robert wrote: > > Both Test::More and WWW::Chat export a routine called fail(). This > > makes it rather hard to write tests for web stuff usi

Re: Test::More and WWW::Chat fighting over fail()

2001-10-07 Thread Michael G Schwern
On Sun, Oct 07, 2001 at 03:57:48PM -0400, Kirrily 'Skud' Robert wrote: > Both Test::More and WWW::Chat export a routine called fail(). This > makes it rather hard to write tests for web stuff using both these > modules. I can solve this from my end by providing contro

Test::More and WWW::Chat fighting over fail()

2001-10-07 Thread Kirrily 'Skud' Robert
Both Test::More and WWW::Chat export a routine called fail(). This makes it rather hard to write tests for web stuff using both these modules. Since WWW::Chat's fail() is only used internally, could I possibly request that it be changed to not export, and/or rename it _fail, or wha

testing web foo with Test::More

2001-10-07 Thread Kirrily 'Skud' Robert
OK, I've been putting off figuring this out for ages, but here it is: #!/usr/bin/perl -w use strict; use Inline 'WebChat'; use Test::More 'no_plan'; ok(google(), "Can get google"); __END__ __WebChat__

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. Schw

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 fo

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread Dave Rolsky
On Tue, 25 Sep 2001, chromatic wrote: > Combining the two gives us a test and a very contrived test failure output: > > isa_ok($foo, 'Alzabo::Foo', 'Return value from $bar->foreign_keys'); > > not ok 1 - $foo->isa('bar') > # Failed test (foo.plx at line 3) > # Retu

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread chromatic
In article <[EMAIL PROTECTED]>, "Dave Rolsky" <[EMAIL PROTECTED]> wrote: > On Tue, 25 Sep 2001, Michael G Schwern wrote: >> A, ok. How about this: >> >> my $yarrow = Bar->new; >> isa_ok($yarrow, "Bar", 'yarrow'); > isa_ok($foo, 'Alzabo::Foo', 'Return value from $bar->foreign_keys

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread Dave Rolsky
On Tue, 25 Sep 2001, Michael G Schwern wrote: > A, ok. How about this: > > my $yarrow = Bar->new; > isa_ok($yarrow, "Bar", 'yarrow'); > > > not ok 1 - yarrow->isa('bar') > # Failed test (foo.plx at line 3) > # yarrow isn't a 'Bar' That's better, I guess. But I'm

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread Michael G Schwern
On Mon, Sep 24, 2001 at 10:40:53PM -0500, Dave Rolsky wrote: > > What sort of names do you tend to throw in there? > > Just something more descriptive than what it generates by default. > Something like "Check that object X isa Blah". The key being that I want > to say _what_ object I'm checking

Re: [PATCH] More Test::More stuff

2001-09-24 Thread Dave Rolsky
On Tue, 25 Sep 2001, Kirrily Robert wrote: > But it does! It says something like: > > not ok 23 > # Failed test 1 (eval.t at line 69) > # got: 'blah blah blah' > # expected: '' Oops, that's what I get for not actually trying it out. I guess that's good enough, though I still l

Re: [PATCH] More Test::More stuff

2001-09-24 Thread Kirrily Robert
In perl.qa, you wrote: >> >> eval { ...code... }; >> is( $@, '' ); > >Yeah, except that doesn't print out $@ in case of failure. If I'm >checking that no exception occurs I want to know what the exception is >when it happens. But it does! It says something like: not ok 23 # Failed

Re: [PATCH] More Test::More stuff

2001-09-24 Thread Dave Rolsky
On Mon, 24 Sep 2001, Michael G Schwern wrote: > On Mon, Sep 24, 2001 at 06:42:55PM -0500, Dave Rolsky wrote: > > +sub eval_ok (&$) { > > +my ($code, $name) = @_; > > + > > +eval { $code->() }; > > +if ($@) { > > + ok( 0, "$name - $@" ); > > +} else { > > + ok( 1, $name ); > >

Re: [PATCH] Test::More isa_ok function

2001-09-24 Thread Dave Rolsky
On Mon, 24 Sep 2001, 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

Re: [PATCH] More Test::More stuff

2001-09-24 Thread Michael G Schwern
On Mon, Sep 24, 2001 at 06:42:55PM -0500, Dave Rolsky wrote: > +sub eval_ok (&$) { > +my ($code, $name) = @_; > + > +eval { $code->() }; > +if ($@) { > + ok( 0, "$name - $@" ); > +} else { > + ok( 1, $name ); > +} > +} The unfortunate problem is this has adverse effect

Re: [PATCH] Test::More isa_ok function

2001-09-24 Thread Michael G Schwern
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

[PATCH] More Test::More stuff

2001-09-24 Thread Dave Rolsky
patches is that I'm trying to use Test::More for Alzabo and these are some changes that would make it more useful for me. -dave --- More.t.old Mon Sep 24 18:35:39 2001 +++ More.t Mon Sep 24 18:39:35 2001 @@ -1,4 +1,4 @@ -use Test::More tests => 22; +use Test::More tests => 25; u

[PATCH] Test::More isa_ok function

2001-09-24 Thread Dave Rolsky
23:24 2001 +++ More.t Mon Sep 24 18:24:15 2001 @@ -1,4 +1,4 @@ -use Test::More tests => 22; +use Test::More tests => 23; use_ok('Text::Soundex'); require_ok('Test::More'); @@ -20,6 +20,7 @@ can_ok pass fail eq_array eq_hash eq_se

Re: What in t/op can use Test::More and what can't.

2001-09-03 Thread Michael G Schwern
On Mon, Sep 03, 2001 at 05:30:21PM +0100, Nicholas Clark wrote: > > t/op/numconvert.t Yes (I don't understand the warning at the top) > > Which warning would that be? Would you believe "# Repent for the end is near?" I have no idea what I was talking about. > I think it's more likely to

Re: What in t/op can use Test::More and what can't.

2001-09-01 Thread Joe McMahon
Am I being goofy if I want to fix the stuff that I know is bad even if it can't be done via an ok() function? I seem to recall that the print "not " unless something; print "ok xx\n"; occurs a lot and make VMS all urpy. I'll look into cleaning that up after doing the ok() insetions. It's p

Re: What in t/op can use Test::More and what can't.

2001-09-01 Thread Joe McMahon
Michael G Schwern wrote: >t/op/flip.t Yes (what is this?) > Flip-flop operator, I think. I'll keep plugging, and thanks for the help. --- Joe M.

Re: What in t/op can use Test::More and what can't.

2001-08-30 Thread Michael G Schwern
On Thu, Aug 30, 2001 at 05:17:57PM -0400, Joe McMahon wrote: > Am I being goofy if I want to fix the stuff that I know is bad even if > it can't be done via an ok() function? I seem to recall that the > print "not " unless something; > print "ok xx\n"; > > occurs a lot and make VMS all urpy.

Re: What in t/op can use Test::More and what can't.

2001-08-30 Thread Michael G Schwern
On Thu, Aug 30, 2001 at 09:25:23PM +0200, H.Merijn Brand wrote: > If I'm right, this is the format test, ain't it? If so, be > *extremely* careful with the last part (60 lines or so), cause it > depends on the way the IO handles are dealt with (nested write's) Hmmm... you're messing with STDOUT.

Re: What in t/op can use Test::More and what can't.

2001-08-30 Thread H.Merijn Brand
On Thu 30 Aug 2001 20:46, Michael G Schwern <[EMAIL PROTECTED]> wrote: > Ok, quick run-through of what in t/op it's safe to use Test::More > with. 'Yes' means use Test::More. 'No' means use an 'ok' function. > 'No way' means yo

What in t/op can use Test::More and what can't.

2001-08-30 Thread Michael G Schwern
Ok, quick run-through of what in t/op it's safe to use Test::More with. 'Yes' means use Test::More. 'No' means use an 'ok' function. 'No way' means you can't even use an 'ok' function. This is just a quick, cursory overview. Scream

Re: Test::More::is() undef ?

2001-08-26 Thread Michael G Schwern
On Sun, Aug 26, 2001 at 12:06:16PM +0100, Nicholas Clark wrote: > With Test::More should I be able to do this: > > is (scalar , undef, "should read undef as we are at eof"); The new versions on CPAN handle this. I just have to get around to patching it into the core. Stu

Re: Test::More::is() undef ?

2001-08-26 Thread Tony Bowden
On Sun, Aug 26, 2001 at 12:06:16PM +0100, Nicholas Clark wrote: > With Test::More should I be able to do this: > is (scalar , undef, "should read undef as we are at eof"); This was fixed in a recent version > sub is ($$;$) { > my($this, $that, $name) = @_; > &g

Re: [PATCH] Test::More PREREQ_PM problem

2001-08-14 Thread Michael G Schwern
On Wed, Aug 15, 2001 at 01:24:00AM +0900, Tatsuhiko Miyagawa wrote: > This will lead to the following error, caused by eval()ing > standalone "use Test::More". > > Odd number of elements in hash assignment at > /usr/local/lib/perl5/site_perl/5.005/Test/Simpl

[PATCH] Test::More PREREQ_PM problem

2001-08-14 Thread Tatsuhiko Miyagawa
When writing tests using Test::More, we should put some phrase like this in Makefile.PL: WriteMakefile( 'NAME'=> 'Foobar', 'VERSION_FROM' => 'Foobar.pm', # finds $VERSION 'PREREQ_PM' => { 'Test

Write core library tests with Test::Simple/Test::More

2001-06-27 Thread Michael G Schwern
Both Test::Simple and Test::More are in bleadperl and will be in 5.8.0. For normal users of the module, this isn't really all that big a thing, since you can just get it from CPAN anyway. What it does mean is the core library tests can now be written using these testing libraries instead o

Descriptive strings in Test::More ?

2001-06-18 Thread Kirrily Robert
PC, and I'm unclear about something. use Test::More no_plan; ok( nonblank("abc") eq "OK" , "Strings aren't blank" ); The above is generated using Pod::Tests and pod2test (yay schwern!). When I run these tests, I never see the descriptions of the tests (e

Re: ANNOUNCE - Test::More no_plan, Pod::Tests useful!

2001-06-14 Thread schwern
On Thu, Jun 14, 2001 at 10:51:10AM +0100, Graham Barr wrote: > Then try this > > use strict; > use Test::More no_plan; D'OH! -- Michael G Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/ Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One

Re: ANNOUNCE - Test::More no_plan, Pod::Tests useful!

2001-06-14 Thread Graham Barr
On Wed, Jun 13, 2001 at 04:56:51PM -0400, [EMAIL PROTECTED] wrote: > On Wed, Jun 13, 2001 at 07:36:15PM +0200, H.Merijn Brand wrote: > > > use Test::More no_plan; > > > > no bare words, please ;-) > > > > use Test::More qw(no_plan); > > I had sta

Re: ANNOUNCE - Test::More no_plan, Pod::Tests useful!

2001-06-13 Thread schwern
On Wed, Jun 13, 2001 at 07:36:15PM +0200, H.Merijn Brand wrote: > > use Test::More no_plan; > > no bare words, please ;-) > > use Test::More qw(no_plan); I had started to add qw() to all my docs, but oddly enough nothing seems to have a problem with that barew

Re: ANNOUNCE - Test::More no_plan, Pod::Tests useful!

2001-06-13 Thread H.Merijn Brand
On Wed 13 Jun 2001 18:59, [EMAIL PROTECTED] wrote: > First, "use Test::More no_plan;" now works! What this means is you > can write: > > use Test::More no_plan; no bare words, please ;-) use Test::More qw(no_plan); > ok($foo == $bar,

ANNOUNCE - Test::More no_plan, Pod::Tests useful!

2001-06-13 Thread schwern
Two big new things in the testing modules. First, "use Test::More no_plan;" now works! What this means is you can write: use Test::More no_plan; ok($foo == $bar,'foo is bar'); ok($right ne $wrong,'morality works'); That's

ANNOUNCE Test::More 0.04

2001-06-07 Thread Michael G Schwern
New version of Test::More en route to CPAN. As always, it can be gotten from http://www.pobox.com/~schwern/src/Test-More-0.04.tar.gz 0.04 Thu Jun 7 11:26:18 BST 2001 - minor bug in eq_set() with complex data structures Thanks to Tatsuhiko Miyagawa for finding this. 0.03 Tue Jun 5