Skip to content

Commit

Permalink
MFH: fix PDO and other 'redirected' tests - add that "# original sour…
Browse files Browse the repository at this point in the history
…ce" line only if the test fails
  • Loading branch information
tony2001 committed Jan 4, 2009
1 parent 543a554 commit fab5be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,6 @@ function run_test($php, $file, $env)
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
Expand Down Expand Up @@ -1871,6 +1870,7 @@ function run_test($php, $file, $env)

// 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");
Expand Down

0 comments on commit fab5be7

Please sign in to comment.