]> granicus.if.org Git - php/commitdiff
Use IS_WINDOWS
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 5 Jan 2020 18:28:34 +0000 (19:28 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 9 Jan 2020 11:04:28 +0000 (12:04 +0100)
run-tests.php

index 1a1d2e9c538364370559849317716c91a176c0c9..21677fa2da2d766935c192582fb1fa0d359a8799 100755 (executable)
@@ -2109,11 +2109,7 @@ TEST $file
        if (array_key_exists('INI', $section_text)) {
                $section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']);
                $section_text['INI'] = str_replace('{TMP}', sys_get_temp_dir(), $section_text['INI']);
-               if (PHP_OS_FAMILY === 'Windows') {
-                       $replacement = '"' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1"';
-               } else {
-                       $replacement = 'tee $1 >/dev/null';
-               }
+               $replacement = IS_WINDOWS ? '"' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1"' : 'tee $1 >/dev/null';
                $section_text['INI'] = preg_replace('/{MAIL:(\S+)}/', $replacement, $section_text['INI']);
                settings2array(preg_split("/[\n\r]+/", $section_text['INI']), $ini_settings);
        }