Re: Re: cvs: pear /Validate package_AT.xml /Validate/Validate AT.php /Validate/tests validate_AT.phpt
| From: | Helgi Þormar Þorbjörnsson | Date: | Wed, 22 Aug 2007 18:39:19 +0000 |
| Subject: | Re: Re: cvs: pear /Validate package_AT.xml /Validate/Validate AT.php /Validate/tests validate_AT.phpt | ||
| References: | 1 2 3 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-48488@lists.php.net to get a copy of this message | ||
Hello,
Well the test suite should be adapted to work with CVS instead of via versa,
if you've done this fix in any other Validate package then please revert it,
adding extra code so external tools can do some fluffy stuff to the package
(even in this case where the tool is extremely useful) is not good practice.
- Helgi
On 8/22/07, Ken Guest <kguest@php.net> wrote:
>
> On Tue, Aug 21, 2007 at 11:26:15PM -0500, Gregory Beaver wrote:
> > Ken Guest wrote:
> > > kguest Tue Aug 21 23:01:09 2007 UTC
> > >
> > > Modified files:
> > > /pear/Validate package_AT.xml
> > > /pear/Validate/Validate AT.php
> > > /pear/Validate/tests validate_AT.phpt
> > > Log:
> > > Bug #11885 coding standard errors plus DATADIR reference won't work
> when testing from CVS
> >
> > [snip]
> >
> > > - $file = '@DATADIR@/Validate_AT/AT_postcodes.txt';
> > > + if ($dataDir != null && (is_file($dataDir .
> '/AT_postcodes.txt'))) {
> > > + $file = $dataDir . '/AT_postcodes.txt';
> > > + } else {
> > > + $file = '@DATADIR@/Validate_AT/AT_postcodes.txt';
> > > + }
> > > $postcodes = array_map('trim', file($file));
> >
> > Hi Ken,
> >
> > This is not the best practice. When testing code from CVS, the best way
> > to do it is have a console window open (or dos box on windows) in which
> > you have typed:
> >
> > pear up -f package_AT.xml
> >
> > in the Validate CVS checkout directory. Then, when you make a change,
> > hit <up arrow> <enter> and run your examples after your Validate_AT has
> > updated. With these two additional keystrokes per edit, you can both
> > ensure your package.xml is valid and that it works as expected from
> > installation, and remove debugging hacks like the thing above.
>
> This is for the PEAR-wide unit test suite that is directly run from cvs;
> unless
> the test suite is adapted to install each package, test it and then
> uninstall
> the package there is probably no option but to have solutions like this in
> place.
>
> > Ask on irc if you want more detailed tips on this - I think it's
> > probably the most important thing I've learned while working in PEAR.
> > Never run a package off of CVS unless you also intend users to run it
> > from an unzip-and-go, then you should test both ways when making a
> change.
>
> Thanks for your advice Greg - I hope there is a faq [or some other stable
> form of knowledge repository] of these tips rather than having to rely
> on IRC and all that it entails.
>
>
> k.
>
> --
> Ken Guest
> Mobile: +353 86 8252 141 http://blogs.linux.ie/kenguest/
> Irish PHP Users Group http://www.php.ie
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
>
> iD8DBQFGy+/qigdNTD9+4fIRAsASAJ0chYiFAJyfIkrIHRkGtQ4ijsxahgCdEwcJ
> t/3qYCBxuCKLTSosIk314Bk=
> =Qgq7
> -----END PGP SIGNATURE-----
>
>