Re: Request to be added to PHP_LexerGenerator (and probably PHP_ParserGenerator)

From: Date: Mon, 24 Sep 2007 22:27:13 +0000
Subject: Re: Request to be added to PHP_LexerGenerator (and probably PHP_ParserGenerator)
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48174@lists.php.net to get a copy of this message
On 2007 09 21 10:05, Greg Beaver wrote:
Alan Langford wrote:
On 2007 09 20 23:39, Greg Beaver wrote:
Alan Langford wrote:
I have found and fixed a bug in this package, and another person has attached a few promising patches to bugs. I have also added processing instructions to flag regular expressions with the case-insensitive and Unicode flags. This makes case-less languages such as SQL much easier to handle. I'd like to get all of these changes (if the patches look good) into the trunk.
Hi Alan, Sounds good to me, please ask PEAR Group for karma to pear/PHP_LexerGenerator. I only ask that if your patch is at all complex, please open a bug report prior to committing so that I can review it. Small patches, such as many of the reports by joror, can be committed without review if you verify they work. I would love to have help with writing tests for the package, and if you feel up to the challenge, please take that on as well. Thanks, Greg
I have merged all the changes into my local copy and made some changes to juror's code (one bug fix and some coding standards compliance edits). The changes still need testing, which is an invitation to start writing test cases. I spent some time last night looking for guidelines and/or documentation on the testing environment without success, can someone point me at information on what's required? I know I've seen this somewhere. Specifically, can I assume that there's an up-to-date version of PHPUnit available? I have a testing assignment in another project that uses this package; it would be good to be able to use the same tools in both places. I might even get to the point where I think I know what I'm doing. Ha.
Hi Alan, Take a look at .phpt tests as well. Examples are in pear/Games_Chess/tests, pear/PEAR_PackageFileManager/tests, pear-core/tests and many other places. If you use phpunit, you must use phpunit.de PHPUnit. Greg
I've spent some time looking at both PHPUnit and .phpt and I have similar problems with both, which means the problem is probably with me instead... I'm trying to set things up so that I can make a change and run one or more tests in the shortest cycle possible, but both test facilities assume an installed code tree, so that PHP_LexerGenerator_Lexer is expected to be found as the installed /PHP/LexerGenerator/Lexer.php rather than CVS's PHP_LexerGenerator/LexerGenerator/Lexer.php Please tell me that there's a simple approach for this. Right now it looks like the right thing to do is to set up a parallel install of PEAR, write a build script that will push my changes and any dependencies into the parallel install, then run everything under a wrapper that points at the test environment. I'm thinking that possibly I can write an __autoload function that looks for an environment variable (PHP_PEAR_CVS_DIR) and pulls the right files in using that. Does that seem workable?

« previous php.pear.dev (#48174) next »