We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaf00e5 commit 869b5b2Copy full SHA for 869b5b2
src/test/java/demo/TerminalContext.java
@@ -85,10 +85,10 @@ public static String captureTerminal(final Runnable call) {
85
86
@Override
87
public void close() {
88
- System.out.close(); // Points to the test-only output stream
89
- System.err.close(); // Points to the test-only output stream
+ final PrintStream wrapper = System.out; // Shared with System.err
90
System.setOut(originalOut);
91
System.setErr(originalErr);
+ wrapper.close();
92
}
93
94
0 commit comments