]> granicus.if.org Git - php/commitdiff
Added ARGS section to allow passing arguments to CLI tests
authorMarcus Boerger <helly@php.net>
Wed, 21 Aug 2002 23:06:38 +0000 (23:06 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 21 Aug 2002 23:06:38 +0000 (23:06 +0000)
run-tests.php

index 167d7593dc154ab763542dbf3dea3151b23757bc..bf0c3a799a9ab0b12e22404d89c00820fd09a181 100755 (executable)
@@ -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";
         
     }