1--TEST--
2Test sapi_windows_vt100_support on older Windows versions with redirected STDOUT/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--
18STDOUT 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(false)
46- current value  : bool(false)
47- disabling VT100: bool(false)
48- current value  : bool(false)
49STDOUT (fopen):
50- current value  : bool(false)
51- enabling VT100 : bool(false)
52- current value  : bool(false)
53- disabling VT100: bool(false)
54- current value  : bool(false)
55STDOUT (php://fd/1):
56- current value  : bool(false)
57- enabling VT100 : bool(false)
58- current value  : bool(false)
59- disabling VT100: bool(false)
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)
79Not a stream:
80- current value  :
81Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
82bool(false)
83- enabling VT100 :
84Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
85bool(false)
86- current value  :
87Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
88bool(false)
89- disabling VT100:
90Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
91bool(false)
92- current value  :
93Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
94bool(false)
95Invalid stream (php://temp):
96- current value  :
97Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
98bool(false)
99- enabling VT100 :
100Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
101bool(false)
102- current value  :
103Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
104bool(false)
105- disabling VT100:
106Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
107bool(false)
108- current value  :
109Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
110bool(false)
111Invalid stream (php://input):
112- current value  :
113Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
114bool(false)
115- enabling VT100 :
116Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
117bool(false)
118- current value  :
119Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
120bool(false)
121- disabling VT100:
122Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
123bool(false)
124- current value  :
125Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
126bool(false)
127Invalid stream (php://memory):
128- current value  :
129Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
130bool(false)
131- enabling VT100 :
132Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
133bool(false)
134- current value  :
135Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
136bool(false)
137- disabling VT100:
138Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
139bool(false)
140- current value  :
141Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
142bool(false)
143File stream:
144- current value  : bool(false)
145- enabling VT100 : bool(false)
146- current value  : bool(false)
147- disabling VT100: bool(false)
148- current value  : bool(false)
149