From: Marcus Boerger Date: Wed, 21 Aug 2002 23:06:38 +0000 (+0000) Subject: Added ARGS section to allow passing arguments to CLI tests X-Git-Tag: RELEASE_0_91~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28ebb82c411b227169779390e08932ad38d97cc3;p=php Added ARGS section to allow passing arguments to CLI tests --- diff --git a/run-tests.php b/run-tests.php index 167d7593dc..bf0c3a799a 100755 --- a/run-tests.php +++ b/run-tests.php @@ -273,6 +273,7 @@ TEST $file 'TEST' => '(unnamed test)', 'SKIPIF' => '', 'GET' => '', + 'ARGS' => '', ); $fp = @fopen($file, "r") @@ -348,6 +349,8 @@ TEST $file putenv("PATH_TRANSLATED=$tmp_file"); putenv("SCRIPT_FILENAME=$tmp_file"); + $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; + if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { $post = trim($section_text['POST']); @@ -366,7 +369,7 @@ TEST $file putenv("CONTENT_TYPE="); putenv("CONTENT_LENGTH="); - $cmd = "$php$ini_settings -f $tmp_file 2>&1"; + $cmd = "$php$ini_settings -f $tmp_file$args 2>&1"; }