cvs: php4(PHP_4_3) / run-tests.php

From: Date: Sat, 19 Apr 2003 18:12:07 +0000
Subject: cvs: php4(PHP_4_3) / run-tests.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20400@lists.php.net to get a copy of this message
iliaa Sat Apr 19 14:12:07 2003 EDT Modified files: (Branch: PHP_4_3) /php4 run-tests.php Log: MFH (pcre sanity check) Index: php4/run-tests.php diff -u php4/run-tests.php:1.119.2.23 php4/run-tests.php:1.119.2.24 --- php4/run-tests.php:1.119.2.23 Sat Apr 19 13:23:11 2003 +++ php4/run-tests.php Sat Apr 19 14:12:07 2003 @@ -36,6 +36,27 @@ * - do not test PEAR components if base class and/or component class cannot be instanciated */ + +/* Sanity check to ensure that pcre extension needed by this script is avaliable. + * In the event it is not, print a nice error message indicating that this script will + * not run without it. + */ + +if (!extension_loaded("pcre")) { + echo <<<NO_PCRE_ERROR + ++-----------------------------------------------------------+ +| ! ERROR ! | +| The test-suite requires that you have pcre extension | +| enabled. To enable this extension either compile your PHP | +| with --with-pcre-regex or if you've compiled pcre as a | +| shared module load it via php.ini. | ++-----------------------------------------------------------+ + +NO_PCRE_ERROR; +exit; +} + // change into the PHP source directory. if (getenv('TEST_PHP_SRCDIR')) {

« previous php.cvs (#20400) next »