com php-src: fix test: sapi/cli/tests/cli_process_title_w indows.phpt
| From: | Anatol Belski | Date: | Mon, 18 Jan 2016 15:52:48 +0000 |
| Subject: | com php-src: fix test: sapi/cli/tests/cli_process_title_w indows.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90683@lists.php.net to get a copy of this message | ||
Commit: 5673ede6e97d8268ff568e9869de88c8632d2011
Author: Anatol Belski <ab@php.net> Mon, 18 Jan 2016 16:52:48 +0100
Parents: adf0be7680969d7ed1191d9d12f204dfe0dd0664
Branches: PHP-5.6 PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5673ede6e97d8268ff568e9869de88c8632d2011
Log:
fix test
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 12eb807..4e81b4c 100644
--- a/sapi/cli/tests/cli_process_title_windows.phpt
+++ b/sapi/cli/tests/cli_process_title_windows.phpt
@@ -21,7 +21,7 @@ if (shell_exec('PowerShell -Help') === NULL)
// cli_set_process_title(). We're only making the API calls to ensure there are
// no warnings/errors.
-$is_windows8 = false;
+$is_windows8_or_above = false;
$ps_output = shell_exec("PowerShell -NoProfile
\"(Get-Host).UI.RawUI.WindowTitle\"");
if ($ps_output === null)
{
@@ -31,8 +31,8 @@ if ($ps_output === null)
$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))
- $is_windows8 = true;
+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;
echo "*** Testing setting the process title ***\n";
@@ -42,7 +42,7 @@ $pid = getmypid();
if (cli_set_process_title($original_title) === true)
echo "Successfully set title\n";
-if ($is_windows8)
+if ($is_windows8_or_above)
{
$loaded_title = $original_title;
}
@@ -82,4 +82,4 @@ else
*** Testing setting the process title ***
Successfully set title
Successfully verified title using get-process
-Successfully verified title using get
\ No newline at end of file
+Successfully verified title using get