summaryrefslogtreecommitdiff
path: root/scripts/dev
diff options
context:
space:
mode:
authorZoe Slattery <zoe@php.net>2008-04-13 10:46:12 +0000
committerZoe Slattery <zoe@php.net>2008-04-13 10:46:12 +0000
commitfbd21a5d01c8a91eed86ad600bc795aeacbf067f (patch)
tree05ebdd1f80d6065773d6e4d48a894abb07d8b38a /scripts/dev
parent58814762662eebe70f92113bccdcc2f81ddbaecd (diff)
downloadphp-git-fbd21a5d01c8a91eed86ad600bc795aeacbf067f.tar.gz
Fixing:
(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..."
Diffstat (limited to 'scripts/dev')
-rw-r--r--scripts/dev/generate_phpt.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/dev/generate_phpt.php b/scripts/dev/generate_phpt.php
index 5280f1d8e7..5570ea8f91 100644
--- a/scripts/dev/generate_phpt.php
+++ b/scripts/dev/generate_phpt.php
@@ -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;
}