Front page | perl.perl5.porters |
Postings from March 2007
Re: [PATCH] p55 tests
Thread Previous
|
Thread Next
From:
Dave Mitchell
Date:
March 21, 2007 17:40
Subject:
Re: [PATCH] p55 tests
Message ID:
20070322004137.GH19003@iabyn.com
On Tue, Mar 20, 2007 at 07:14:18PM +0100, Gerard Goossen wrote:
> This patch adds a test for p55, the "Perl 5 to Perl 5" translator.
>
> The patch is a bit large, because I made 'nomad' into a package
> 'Nomad.pm', but I don't think I changed anything to its internals.
> Important part is the mad/t/p55.t other changes are moving things or
> helper routines.
Can I suggest that you submit this is two separate patches. First,
where you strictly just cut-paste the body of mad/nomad to Nomad.pm,
with no changes. Then in a second patch, include any fixups to Noamd.pm
plus the other changes. That way it's easier for people reviewing
history to see and understand any changes.
Also, when adding new files, you should also patch MANIFEST.
> About running the mad/t/p55.t test:
Some suggestions about p55.t. First off, I think it may be worthwhile
investing effort in t/TEST instead (or as well), to give it a new
command-line option (-mad say) that runs the p55 converter on the listed
test files, eg
t/TEST -mad op/*.t
That way you quickly get wide coverage all all the nooks and crannies in
perl's syntax.
Actually it might be worth having two new options: one that just runs the
p5 to xml converter on each test file (to see if anything blows up); this
can then be easily run from smokes; and a second option, which requires
XML::Parser and does the full p5 to p5 round trip on each test file and
compares the differences.
If you prefer to stick with p55.t, then I'd suggest putting the test
programs after __END__ and extract them out with a delimiter such as
'########', which makes it easier and cleaner to add tests. See
t/op/anonsub.t for one example of many. (In this case you can skip the
EXPECT section since what we expect is the same as what we're testing :-)
--
You're only as old as you look.
Thread Previous
|
Thread Next