Commit a23678c
committed
Fix switch_stdout_to on Windows7
The switch_stdout_to test was broken on Windows7, as the test
infrastructure would refuse to delete the temporary test folder because
the switch-stdout-output file we redirected the stdout to was still
opened.
To fix this issue, we make switch_stdout_to return the previous handle,
and add a new switch_stdout_to call at the end of the test to return the
stdio handles to their original state. The handle the second
switch_stdout_to returns will be automatically closed, which should
allow the temporary test folder to be deleted properly.1 parent 91bbdd9 commit a23678c
1 file changed
+20
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
22 | | - | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| 36 | + | |
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| 41 | + | |
30 | 42 | | |
31 | 43 | | |
| 44 | + | |
| 45 | + | |
32 | 46 | | |
33 | 47 | | |
| 48 | + | |
34 | 49 | | |
35 | 50 | | |
36 | 51 | | |
| |||
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
46 | | - | |
| 61 | + | |
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
| |||
0 commit comments