Re: Test::Legacy warnock'd

2004-12-21 Thread Tels
-BEGIN PGP SIGNED MESSAGE-

Moin,

On Tuesday 21 December 2004 19:35, Michael G Schwern wrote:
> On Tue, Dec 21, 2004 at 06:09:40PM +0100, Tels wrote:
> > Granted, that was what I did before Test::Legacy, which seems to have
> > gone from a wild idea to some working stage while I was not looking :)
>
> Most of it was written in about an hour and a half late one night with
> another hour worth of polishing.  I decided rather than try to somehow
> merge with the Test.pm code base, which looked daunting, I'd see how far I
> could get prototyping it up from scratch.  Answer: nearly all the way!

Not because it was easy, but because you a genius :)

> > Oooh, you mean I change:
[schnipp]
> By jove I think he's got it!  I'll make the docs a little more explicit
> about that though.

Not everybody is knee-deep in testing and all that stuff. In fact, I would say 
most "normal" authors are probably a bit out of the loop and really need docs 
to tell them the "why" and "how". 

So far quite a lot of the docs (if not most) talk about "how", but not "why" 
you would want to use that module, or what it is for. Unfortunately, the 
person most likely to fix the docs, the author, usually doesn't need nor read 
them, and even if he did, he wouldn't notice that something is wrong.

Best wishes,

Tels

- -- 
 Signed on Tue Dec 21 19:05:07 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Retsina?" - "Ja, Papa?" - "Rasenmähen." - "Is gut, Papa."

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQchm9XcLPEOTuEwVAQF4Hwf/RvUw7XZVF0W7rE0wgv8pCq6LvmwNkfp8
NAsH4Ec6f5Q1jhKharcfs7WKIj3tot051GKZBVa5g3tbhLF2KtJZ17duV7FrznM7
yVtPvjhQ8ndetm1+88K5POYtD9IL28f3d+a1z0yCSziSkEApUYYc077f/OD/VY1l
5BNUYdevPzyo7q3f5SytUxpNStqj3xddxUnvv5K+HFbX1SpAPWWaKcZbwIe15aQR
To7XrkyEtfx7TuR9yeOD21FORr2hmR8OjjxWqL7VHYFs7FxvzCW9e1Z6Aiq/6Ji1
Tm+q3YinJ93548jSVGXENJiFKVdVvyBLXX3gfG2HPOmiSF5/eD//vA==
=3x9u
-END PGP SIGNATURE-


Re: Test::Legacy warnock'd

2004-12-21 Thread Tels
-BEGIN PGP SIGNED MESSAGE-

Moin,

On Tuesday 21 December 2004 18:32, Michael G Schwern wrote:
> On Tue, Dec 21, 2004 at 04:53:18PM +0100, Tels wrote:
> > On Tuesday 21 December 2004 08:53, Michael G Schwern wrote:
> > > I've gotten absolutely no response about Test::Legacy.  Is anybody
> > > using it?  Anybody tried migrating old Test.pm based tests with it?
> >
> > I am converting my old tests directly to Test::More (Test::legacy wasn't
> > available before so :)
> >
> > Currently I do not plan to do this - the old tests either work (never fix
> > what is working) or they don't (seldom), at which point I would convert
> > them to Test::More.
>
> There's no "I want to add a new test to this test file that uses Test.pm
> and it would be nice if I could use Test::Foo" case?

Depending on the size of the testfile and my mood to change, I either
grudgingly add another ok() (if the "test-cases" aren't in the data section
anyway), or convert it to Test::More straightaway.

Granted, that was what I did before Test::Legacy, which seems to have gone
from a wild idea to some working stage while I was not looking :)

So, what would the benefit of using Test::Legacy? Reading the pod I do not see
for me why I should use it, because I only ever used Test.pm, or Test::More
and never both of them in the same test script.

(I try to keep my tests simple so that even people like me in 3 months
understand them :)

Yes, I could go all nillywilly :) and change every "use Test;" to "use
Test::Legacy;" but as I said, don't fix what aint borkened. Of course, unless
you tell me that "use Test;" _is_ broken and one should replace it :o) I am
really open-minded about this. Maybe there are problems which I simple
haven't noticed yet - my experience is quite limited.

Afterthought:

Oooh, you mean I change:

use Test;

to:

use Test::Legacy;
use Test::More;

and slap an is() a the end? Wow, that would be nifty. You should mention this 
in the docs!

I do think that I still would convert the tests eventually to Test::More, but 
for the more huge test files that would be a nice intermidiate solution..

Best wishes,

Tels

- --
 Signed on Tue Dec 21 17:53:08 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Laugh and the world laughs with you, snore and you sleep alone." --
 Unknown

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQchY1HcLPEOTuEwVAQEKyAf9GtIWdmx8KSgBsl5osrhVjbv/48B1tTqX
ny48s5U2vOGbCUqt06NNd40WrXBd5O/N41SINXyXSbkVerNOBHuxQNurvW+LLUA1
+h5FyL1DLx55cEtoSj/wllQhj14M4iSAcC8N+/4wJqdK47gz+O1heQ5ug0wJK4GU
nvWP4OilsF2GvOlb/7Gg52JFsjx51johuTBmesQUe9r6h8v8naWKFn65ItqWnJF8
Ier32h3dMV6y2ke3iNvL+s/jKadE59nt2YN8kfgsdf6wnzUurr7dUnTFz5uhDlFv
F7xr3Vq1V0hFEswyuLCeuJC6Uhpz4Z3i3mTMk7++QjehYMlp1Qpfyg==
=hQBz
-END PGP SIGNATURE-


Re: Test::Legacy warnock'd

2004-12-21 Thread Tels
-BEGIN PGP SIGNED MESSAGE-

Moin,

On Tuesday 21 December 2004 08:53, Michael G Schwern wrote:
> I've gotten absolutely no response about Test::Legacy.  Is anybody
> using it?  Anybody tried migrating old Test.pm based tests with it?

I am converting my old tests directly to Test::More (Test::legacy wasn't 
available before so :)

Currently I do not plan to do this - the old tests either work (never fix what 
is working) or they don't (seldom), at which point I would convert them to 
Test::More.

Best wishes,

Tels

- -- 
 Signed on Tue Dec 21 16:51:54 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Elliot, sie Schwachkopf!"

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQchG+HcLPEOTuEwVAQG3hQf/QJa3/rTZXr1VDQ5trSeZ7Ip+SAf57mkj
/WHqxi3riUmwobJMfI2OrOGgN04ciY2dGLrVVDSwy2KOiKzetQ3uLJC/AyryoV/h
FyuQRSHNEYi3h1jucWRAsNrTiFcRYIou+yRoVxy04x5RkSmH2sDgPnlzIsPewZFx
EtOxQMajJM+8jk6uBtPwkVBD0pF2Huru8oag8wxQdhIMKDnS3KEDWo03QeoFyQF9
3NjGEXKeW+KV3LIPZTLWubSZFv+NvxpuPiydgRnyv9pLGMGKMVgr8B78pCyQa/Rz
JOsmcjMG7ciLQcrR6W0qiCsXNCEUNjwia5zmsJ8LzuYNV6i7fvmFqQ==
=sJ4Y
-END PGP SIGNATURE-


Re: Test::Legacy warnock'd

2004-12-21 Thread H.Merijn Brand
On Tue 21 Dec 2004 18:32, Michael G Schwern <[EMAIL PROTECTED]> wrote:
> On Tue, Dec 21, 2004 at 04:53:18PM +0100, Tels wrote:
> > On Tuesday 21 December 2004 08:53, Michael G Schwern wrote:
> > > I've gotten absolutely no response about Test::Legacy.  Is anybody
> > > using it?  Anybody tried migrating old Test.pm based tests with it?
> > 
> > I am converting my old tests directly to Test::More (Test::legacy wasn't 
> > available before so :)
> > 
> > Currently I do not plan to do this - the old tests either work (never fix 
> > what 
> > is working) or they don't (seldom), at which point I would convert them to 
> > Test::More.
> 
> There's no "I want to add a new test to this test file that uses Test.pm and
> it would be nice if I could use Test::Foo" case?

I also immetiately switched from Copy-n-Paste tests (all starting DBD authors
do) to a full fletched Test::More, and used T::M for every test written from
scratch thereafter. I never (knowingly) used Test.pm for my own tests.

-- 
H.Merijn BrandAmsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.5, & 5.9.x, and 809 on  HP-UX 10.20 & 11.00, 11i,
   AIX 4.3, AIX 5.2, SuSE 9.1, and Win2k.  http://www.cmve.net/~merijn/
http:[EMAIL PROTECTED]/   [EMAIL PROTECTED]
send smoke reports to: [EMAIL PROTECTED], QA: http://qa.perl.org




Re: Test::Legacy warnock'd

2004-12-21 Thread Michael G Schwern
On Tue, Dec 21, 2004 at 06:09:40PM +0100, Tels wrote:
> Granted, that was what I did before Test::Legacy, which seems to have gone
> from a wild idea to some working stage while I was not looking :)

Most of it was written in about an hour and a half late one night with
another hour worth of polishing.  I decided rather than try to somehow
merge with the Test.pm code base, which looked daunting, I'd see how far I 
could get prototyping it up from scratch.  Answer: nearly all the way!


> Oooh, you mean I change:
> 
>   use Test;
> 
> to:
> 
>   use Test::Legacy;
>   use Test::More;
> 
> and slap an is() a the end? Wow, that would be nifty. You should mention this 
> in the docs!
> 
> I do think that I still would convert the tests eventually to Test::More, but 
> for the more huge test files that would be a nice intermidiate solution..

By jove I think he's got it!  I'll make the docs a little more explicit
about that though.

And you don't have to stop with Test::More.

use Test::Legacy;

# you don't want to blow over Test::Legacy's own functions
use Test::More import => ['!ok', '!plan', '!skip'];
use Test::Exception;
use Test::WWW::Mechanize;
...etc...


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
You see, in this world there's two kinds of people.  Those with loaded
guns, and those who dig.  Dig.
-- Blondie, "The Good, The Bad And The Ugly"


Re: Test::Legacy warnock'd

2004-12-21 Thread Geoffrey Young

> But for all Test::Builder based modules you can get the same intent with
> Test::Builder->reset.

yup, I used that for the port away from Test.pm - works like a charm :)

--Geoff


Re: Test::Legacy warnock'd

2004-12-21 Thread Michael G Schwern
On Tue, Dec 21, 2004 at 12:56:27PM -0500, Geoffrey Young wrote:
> > There's no "I want to add a new test to this test file that uses Test.pm and
> > it would be nice if I could use Test::Foo" case?
> 
> I could see this being really good for Apache-Test, which is by default
> Test.pm driven.  the thing is that
> 
>   - I've already ported A-T to use Test::More in place of Test.pm
> 
>   - the native implementation uses Test.pm magic like
> 
> $Test::ntest = 1;

$Test::Legacy::ntest = 1 will DWYM.  $TESTERR and $TESTOUT work, too.  I
should probably emphisize this in the docs as folks are going to assume
it doesn't work.

Test::Builder->current_test(0) will also DWYM.


> %Test::todo = ();

You're treading on thin ice using that from Test.pm.  Even Test.pm's own
tests don't use that.  However, it would be trivial to make Test::Legacy
support that as well.

But for all Test::Builder based modules you can get the same intent with
Test::Builder->reset.


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
...and that, children, is how to clean and load a .38 revolver.  Questions?


Re: Test::Legacy warnock'd

2004-12-21 Thread Geoffrey Young


Michael G Schwern wrote:
> On Tue, Dec 21, 2004 at 04:53:18PM +0100, Tels wrote:
> 
>>On Tuesday 21 December 2004 08:53, Michael G Schwern wrote:
>>
>>>I've gotten absolutely no response about Test::Legacy.  Is anybody
>>>using it?  Anybody tried migrating old Test.pm based tests with it?
>>
>>I am converting my old tests directly to Test::More (Test::legacy wasn't 
>>available before so :)
>>
>>Currently I do not plan to do this - the old tests either work (never fix 
>>what 
>>is working) or they don't (seldom), at which point I would convert them to 
>>Test::More.
> 
> 
> There's no "I want to add a new test to this test file that uses Test.pm and
> it would be nice if I could use Test::Foo" case?

I could see this being really good for Apache-Test, which is by default
Test.pm driven.  the thing is that

  - I've already ported A-T to use Test::More in place of Test.pm

  - the native implementation uses Test.pm magic like

$Test::ntest = 1;
%Test::todo = ();

which I figured might be supported in time but not at the moment.  of
course, that was only speculation on my part, since

  - a severe lack of tuits on my part has kept me away

so I, for one, am very sorry that you've taken the time to work on something
that might prove useful to me and I haven't been able to reciprocate with
any kind of meaningful feedback.

sorry.

--Geoff


Re: Test::Legacy warnock'd

2004-12-21 Thread Michael G Schwern
On Tue, Dec 21, 2004 at 04:53:18PM +0100, Tels wrote:
> On Tuesday 21 December 2004 08:53, Michael G Schwern wrote:
> > I've gotten absolutely no response about Test::Legacy.  Is anybody
> > using it?  Anybody tried migrating old Test.pm based tests with it?
> 
> I am converting my old tests directly to Test::More (Test::legacy wasn't 
> available before so :)
> 
> Currently I do not plan to do this - the old tests either work (never fix 
> what 
> is working) or they don't (seldom), at which point I would convert them to 
> Test::More.

There's no "I want to add a new test to this test file that uses Test.pm and
it would be nice if I could use Test::Foo" case?


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
Ooops, fatal mutation in the test script.


Test::Legacy warnock'd

2004-12-20 Thread Michael G Schwern
I've gotten absolutely no response about Test::Legacy.  Is anybody
using it?  Anybody tried migrating old Test.pm based tests with it?

-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
I'm crazy but I get the job done.