1--TEST--
2Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/STDERR
3--SKIPIF--
4<?php
5if (getenv("SKIP_IO_CAPTURE_TESTS")) {
6    die("skip I/O capture test");
7}
8if(PHP_OS_FAMILY !== "Windows") {
9    echo "skip Only for Windows systems";
10} elseif (version_compare(
11    PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
12     '10.0.10586'
13) < 0) {
14    echo "skip Only for Windows systems >= 10.0.10586";
15}
16?>
17--CAPTURE_STDIO--
18STDIN STDERR
19--FILE--
20<?php
21require __DIR__.'/sapi_windows_vt100_support.inc';
22testToStdErr();
23?>
24--EXPECTF--
25STDIN (constant):
26- current value  : bool(false)
27- enabling VT100 : bool(false)
28- current value  : bool(false)
29- disabling VT100: bool(false)
30- current value  : bool(false)
31STDIN (fopen):
32- current value  : bool(false)
33- enabling VT100 : bool(false)
34- current value  : bool(false)
35- disabling VT100: bool(false)
36- current value  : bool(false)
37STDIN (php://fd/0):
38- current value  : bool(false)
39- enabling VT100 : bool(false)
40- current value  : bool(false)
41- disabling VT100: bool(false)
42- current value  : bool(false)
43STDOUT (constant):
44- current value  : bool(false)
45- enabling VT100 : bool(true)
46- current value  : bool(true)
47- disabling VT100: bool(true)
48- current value  : bool(false)
49STDOUT (fopen):
50- current value  : bool(false)
51- enabling VT100 : bool(true)
52- current value  : bool(true)
53- disabling VT100: bool(true)
54- current value  : bool(false)
55STDOUT (php://fd/1):
56- current value  : bool(false)
57- enabling VT100 : bool(true)
58- current value  : bool(true)
59- disabling VT100: bool(true)
60- current value  : bool(false)
61STDERR (constant):
62- current value  : bool(false)
63- enabling VT100 : bool(false)
64- current value  : bool(false)
65- disabling VT100: bool(false)
66- current value  : bool(false)
67STDERR (fopen):
68- current value  : bool(false)
69- enabling VT100 : bool(false)
70- current value  : bool(false)
71- disabling VT100: bool(false)
72- current value  : bool(false)
73STDERR (php://fd/2):
74- current value  : bool(false)
75- enabling VT100 : bool(false)
76- current value  : bool(false)
77- disabling VT100: bool(false)
78- current value  : bool(false)
79Invalid stream (php://temp):
80- current value  : bool(false)
81- enabling VT100 :
82Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
83bool(false)
84- current value  : bool(false)
85- disabling VT100:
86Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
87bool(false)
88- current value  : bool(false)
89Invalid stream (php://input):
90- current value  : bool(false)
91- enabling VT100 :
92Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
93bool(false)
94- current value  : bool(false)
95- disabling VT100:
96Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
97bool(false)
98- current value  : bool(false)
99Invalid stream (php://memory):
100- current value  : bool(false)
101- enabling VT100 :
102Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
103bool(false)
104- current value  : bool(false)
105- disabling VT100:
106Warning: sapi_windows_vt100_support(): not able to analyze the specified stream in %s on line %d
107bool(false)
108- current value  : bool(false)
109File stream:
110- current value  : bool(false)
111- enabling VT100 : bool(false)
112- current value  : bool(false)
113- disabling VT100: bool(false)
114- current value  : bool(false)
115