We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3ddda4 commit 7be61beCopy full SHA for 7be61be
run-tests.php
@@ -1774,11 +1774,17 @@ function run_worker(): void
1774
function show_file_block(string $file, string $block, ?string $section = null): void
1775
{
1776
global $cfg;
1777
+ global $colorize;
1778
1779
if ($cfg['show'][$file]) {
1780
if (is_null($section)) {
1781
$section = strtoupper($file);
1782
}
1783
+ if ($section === 'DIFF' && $colorize) {
1784
+ // '-' is Light Red for removal, '+' is Light Green for addition
1785
+ $block = preg_replace('/^[0-9]+\-\s.*$/m', "\e[1;31m\\0\e[0m", $block);
1786
+ $block = preg_replace('/^[0-9]+\+\s.*$/m', "\e[1;32m\\0\e[0m", $block);
1787
+ }
1788
1789
echo "\n========" . $section . "========\n";
1790
echo rtrim($block);
0 commit comments