From: Moriyoshi Koizumi Date: Fri, 25 Jul 2003 05:52:26 +0000 (+0000) Subject: MFH(r-1.168): fix run-test.php so it can correctly handle skip conditions. X-Git-Tag: php-4.3.3RC2~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e0da82b7f1c95dbf81bc40d091fefb154ad3bd2;p=php MFH(r-1.168): fix run-test.php so it can correctly handle skip conditions. --- diff --git a/run-tests.php b/run-tests.php index da91aeb67f..6b50e8df11 100755 --- a/run-tests.php +++ b/run-tests.php @@ -608,11 +608,14 @@ TEST $file if (array_key_exists('SKIPIF', $section_text)) { if (trim($section_text['SKIPIF'])) { save_text($tmp_skipif, $section_text['SKIPIF']); - $output = `$php $info_params $tmp_skipif`; + $extra = substr(PHP_OS, 0, 3) !== "WIN" ? + "unset REQUEST_METHOD;": ""; + + $output = `$extra $php $info_params -f $tmp_skipif`; @unlink($tmp_skipif); if (eregi("^skip", trim($output))) { echo "SKIP $tested"; - $reason = (ereg("^skip[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; + $reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; if ($reason) { echo " (reason: $reason)\n"; } else {