From 5e0da82b7f1c95dbf81bc40d091fefb154ad3bd2 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Fri, 25 Jul 2003 05:52:26 +0000 Subject: [PATCH] MFH(r-1.168): fix run-test.php so it can correctly handle skip conditions. --- run-tests.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 { -- 2.50.1