]> granicus.if.org Git - php/commitdiff
Fixing:
authorZoe Slattery <zoe@php.net>
Sun, 13 Apr 2008 10:46:12 +0000 (10:46 +0000)
committerZoe Slattery <zoe@php.net>
Sun, 13 Apr 2008 10:46:12 +0000 (10:46 +0000)
(1) remove proto from start
(2)substitute "Done" with ===DONE== after closing tag in FILE section and at end of EXPECTF.
(3) Remove "add comment here..."

scripts/dev/generate_phpt.php

index 5280f1d8e7001e65a7a29f0c0eb91b11efda7fbd..5570ea8f91a399eb1b0fc2d0d2f13603c6e7ae07 100644 (file)
@@ -49,7 +49,7 @@ if ($test_info['error'] != NULL) {
        exit();
 }
 
-$test_info['proto'] = "proto ".$test_info['return_type']." ". $test_info['name']."(".$test_info['params'].")";
+$test_info['proto'] = $test_info['return_type']." ". $test_info['name']."(".$test_info['params'].")";
 
 
 //Set the test sections array - may want more in this later?
@@ -448,7 +448,7 @@ function gen_variation_test($fn_det, $sections) {
                        $test_case = array();
 
                        $test_case = gen_test_header($name, $proto, $desc, 
-                                     $source_file, "usage variations", " - <type here specifics of this variation>", $alias, $test_case);
+                                     $source_file, "usage variation","", $alias, $test_case);
 
                        // add variation code
                        $test_case['--FILE--'] = gen_variation_diff_arg_values_test($name, $arg_det, $arg_count, $test_case['--FILE--']);
@@ -495,10 +495,6 @@ function gen_test_header($fn_name, $proto, $desc, $source_file, $type_msg, $extr
                                        " * Alias to functions: $alias",
                                        " */",
                                        "",
-                                       "/*",
-                                       " * add a comment here to say what the test is supposed to do",
-                                       " */",
-                                       "",
                                        "echo \"*** Testing $fn_name() : $type_msg ***\\n\";",
                                        ""
                                        );
@@ -558,12 +554,12 @@ function gen_error_test($fn_det, $sections, $test_case) {
 function gen_test_trailer($test_case, $section_key = "--EXPECTF--") {
        //Complete the --FILE-- section
        array_push($test_case['--FILE--'], "");
-       array_push($test_case['--FILE--'], "echo \"Done\";", "?>");
+       array_push($test_case['--FILE--'], "?>\n===DONE===");
 
        //add a new key for the expect section
        $test_case[$section_key]=array();
        array_push($test_case[$section_key], "Expected output goes here"); 
-       array_push($test_case[$section_key], "Done"); 
+       array_push($test_case[$section_key], "===DONE==="); 
 
        return $test_case;
 }