com php-src: Fix the version check causing the test fail: sapi/cli/tests/cli_process_title_windows.phpt
| From: | Anatol Belski | Date: | Mon, 18 Sep 2017 10:04:31 +0000 |
| Subject: | com php-src: Fix the version check causing the test fail: sapi/cli/tests/cli_process_title_windows.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99447@lists.php.net to get a copy of this message | ||
Commit: 9641586efa861abc1f6b1dba9efba73a065e3ca5
Author: Anatol Belski <ab@php.net> Mon, 18 Sep 2017 12:04:31 +0200
Parents: 7670590efdd2dfa63599873196ed7c8abeafd040
Branches: PHP-7.0 PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9641586efa861abc1f6b1dba9efba73a065e3ca5
Log:
Fix the version check causing the test fail
Changed paths:
M sapi/cli/tests/cli_process_title_windows.phpt
Diff:
diff --git a/sapi/cli/tests/cli_process_title_windows.phpt
b/sapi/cli/tests/cli_process_title_windows.phpt
index 4e81b4c..91bac57 100644
--- a/sapi/cli/tests/cli_process_title_windows.phpt
+++ b/sapi/cli/tests/cli_process_title_windows.phpt
@@ -20,19 +20,7 @@ if (shell_exec('PowerShell -Help') === NULL)
// Hence on Windows 8, we don't verify that the title is actually set by
// cli_set_process_title(). We're only making the API calls to ensure there are
// no warnings/errors.
-
-$is_windows8_or_above = false;
-$ps_output = shell_exec("PowerShell -NoProfile
\"(Get-Host).UI.RawUI.WindowTitle\"");
-if ($ps_output === null)
-{
- echo "Get-Host failed\n";
- die();
-}
-
-$ps_output = trim($ps_output);
-$end_title_windows8 = ": Windows PowerShell";
-if (($ps_output == "Windows PowerShell") || (strlen($ps_output) >
strlen($end_title_windows8) && substr($ps_output,-strlen($end_title_windows8)) ===
$end_title_windows8) || PHP_WINDOWS_VERSION_MAJOR >= 10)
- $is_windows8_or_above = true;
+$is_windows8_or_above = PHP_WINDOWS_VERSION_MAJOR >= 10 || PHP_WINDOWS_VERSION_MAJOR >= 6
&& PHP_WINDOWS_VERSION_MINOR >= 2;
echo "*** Testing setting the process title ***\n";