2016-08-29 09:57:53 +00:00
|
|
|
--TEST--
|
|
|
|
Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/STDOUT/STDERR
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
2016-11-05 23:04:53 +00:00
|
|
|
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
|
2020-09-18 12:28:32 +00:00
|
|
|
die("skip I/O capture test");
|
2016-11-05 23:04:53 +00:00
|
|
|
}
|
2017-02-22 11:31:06 +00:00
|
|
|
if(PHP_OS_FAMILY !== "Windows") {
|
2016-08-29 09:57:53 +00:00
|
|
|
echo "skip Only for Windows systems";
|
|
|
|
} elseif (version_compare(
|
|
|
|
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
|
2020-09-18 12:28:32 +00:00
|
|
|
'10.0.10586'
|
2016-08-29 09:57:53 +00:00
|
|
|
) < 0) {
|
2020-09-18 12:28:32 +00:00
|
|
|
echo "skip Only for Windows systems >= 10.0.10586";
|
2016-08-29 09:57:53 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
--CAPTURE_STDIO--
|
|
|
|
STDIN STDOUT STDERR
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2019-03-15 21:55:30 +00:00
|
|
|
require __DIR__.'/sapi_windows_vt100_support.inc';
|
2016-08-29 09:57:53 +00:00
|
|
|
testToStdOut();
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
STDIN (constant):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDIN (fopen):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDIN (php://fd/0):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDOUT (constant):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDOUT (fopen):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDOUT (php://fd/1):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDERR (constant):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDERR (fopen):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
STDERR (php://fd/2):
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
Invalid stream (php://temp):
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 :
|
|
|
|
Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
|
2016-08-29 09:57:53 +00:00
|
|
|
bool(false)
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100:
|
|
|
|
Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
|
2016-08-29 09:57:53 +00:00
|
|
|
bool(false)
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
2016-08-29 09:57:53 +00:00
|
|
|
Invalid stream (php://input):
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 :
|
|
|
|
Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
|
2016-08-29 09:57:53 +00:00
|
|
|
bool(false)
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100:
|
|
|
|
Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
|
2016-08-29 09:57:53 +00:00
|
|
|
bool(false)
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
2016-08-29 09:57:53 +00:00
|
|
|
Invalid stream (php://memory):
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 :
|
|
|
|
Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
|
2016-08-29 09:57:53 +00:00
|
|
|
bool(false)
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100:
|
|
|
|
Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
|
2016-08-29 09:57:53 +00:00
|
|
|
bool(false)
|
2020-07-16 07:09:12 +00:00
|
|
|
- current value : bool(false)
|
2016-08-29 09:57:53 +00:00
|
|
|
File stream:
|
|
|
|
- current value : bool(false)
|
|
|
|
- enabling VT100 : bool(false)
|
|
|
|
- current value : bool(false)
|
|
|
|
- disabling VT100: bool(false)
|
|
|
|
- current value : bool(false)
|