summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2009-01-04 15:56:45 +0000
committerAntony Dovgal <tony2001@php.net>2009-01-04 15:56:45 +0000
commitfab5be7f2101dd0c364f6dc1c5cd32365d81da64 (patch)
tree573f2df6b97778844e2acb549f5082fca481a185
parent543a554da95429a5788c812284018707d80693ef (diff)
downloadphp-git-fab5be7f2101dd0c364f6dc1c5cd32365d81da64.tar.gz
MFH: fix PDO and other 'redirected' tests - add that "# original source" line only if the test fails
-rwxr-xr-xrun-tests.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php
index f1726e8485..47dc73c8f7 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1338,7 +1338,6 @@ TEST $file
if (is_array($IN_REDIRECT)) {
$tested = $IN_REDIRECT['prefix'] . ' ' . trim($section_text['TEST']);
$tested_file = $tmp_relative_file;
- $section_text['FILE'] = "# original source file: $shortname\n" . $section_text['FILE'];
}
// unlink old test results
@@ -1871,6 +1870,7 @@ COMMAND $cmd
// write .diff
$diff = generate_diff($wanted, $wanted_re, $output);
+ $diff = "# original source file: $shortname\n" . $diff;
show_file_block('diff', $diff);
if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, (binary) $diff, FILE_BINARY) === false) {
error("Cannot create test diff - $diff_filename");