STDERR tests in Test::Warn?

2003-02-27 Thread schwern
As comes up pretty often, people want to trap stuff on STDERR. I've got adhoc stuff to do that in TieOut.pm, but I've never really found a good place to put it in a module. Test::Warn seems like its a good spot. Warnings and stuff going directly to STDERR are related beasts. So if Janek wants

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

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

Test::Set

2003-02-27 Thread Fergal Daly
I've been discussing this with Mr Schwern recently but he's a little indisposed at the moment so this seemed like a good place for feedback. Test::More's eq_set() is not a set comparison or a bag comparison but a strange array comparison where the order of scalars doesn't matter but the order o

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 differing at: # $got->[0][1][2][3][4][5] = 'b' # $exp

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

2003-02-27 Thread Fergal Daly
On Thursday 27 February 2003 20:54, [EMAIL PROTECTED] wrote: > On Thu, Feb 27, 2003 at 05:32:42PM +, Fergal Daly wrote: > > I think that although a test that ignores blessed classes could be handy > > in some circumstances (ie programming in general), I reckon in the > > context of test suites

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

One more Test::More problem

2003-02-27 Thread Fergal Daly
Final one tonight! eq_array and eq_hash don't tidy up after themselves. You would have to be very unfortunate to be stung by this problem but potentially you could end up with extra references to some of your variables which could effect tests further on due to DESTROYs not being called or what