summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2009-01-05 09:18:57 +0000
committerAntony Dovgal <tony2001@php.net>2009-01-05 09:18:57 +0000
commit9a06642ab08414ccac2325e2b079e9890a27d999 (patch)
tree59d2d5f963202b0784ac21ba37c2da0e6a4bce30
parenta26c94c7d97b6e3996964cf5e495f9f5b3aa1613 (diff)
downloadphp-git-9a06642ab08414ccac2325e2b079e9890a27d999.tar.gz
only add "# original source" if a redirect is active
-rwxr-xr-xrun-tests.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php
index f89535c5d3..82f7b24152 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1870,7 +1870,9 @@ COMMAND $cmd
// write .diff
$diff = generate_diff($wanted, $wanted_re, $output);
- $diff = "# original source file: $shortname\n" . $diff;
+ if (is_array($IN_REDIRECT)) {
+ $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");