Re: Regression test

From: Date: Mon, 14 Aug 2000 17:05:00 +0000
Subject: Re: Regression test
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-678@lists.php.net to get a copy of this message
Great. Now my second question... I want to create a test for dbase_add_record(). In order to test that it IS working correctly, I need to compare against a .dbf created as a by-product of the function. I'm not sure how to compare 2 dbf files...does the regtest framework support this? On Sun, 13 Aug 2000, jalal wrote the following to Joey Smith and PHP...: > On Sat, 12 Aug 2000 23:18:06 -0600 (MDT), Joey Smith wrote: > > >Where in the regtest system would I put a bug that doesn't (yet) need to > >check it's output, I just need to make sure that PHP is not crashing... > > > >The function it's calling is still buggy, but it won't be fixed this > >release (I'm betting). > > > > Make a script something like crashtest.php: > > <?php > echo "Start of crash test.\n"; > > mycrashfunction(); > > echo "End of crash test.\n"; > ?> > > and a file, crashtest.out: > > Start of crash test. > End of crash test. > > Put the php file in the regtests/test/suite/bin directory > Put the .out file in teh regtests/test/ideals directory > > Then whenever the test scripts are run, there will be an error in teh > compare script *until* the bug is fixed, and then it will disappear. > > Alternatively, the other logic could be applied, by making the the php > file like so: > > <?php > echo "Start of crash test.\n"; > > mycrashfunction(); > > echo "Crash test: the bug has been fixed!\n"; > ?> > > and a crashtest.out file: > > Start of crash test. > > Then the compare test will not have any errors, until the bug is fixed, > and then it will throw up the line "Crash test: the bug has been > fixed!" as being an extra line. > > -- jalal -- > >

« previous php.qa (#678) next »