summaryrefslogtreecommitdiff
path: root/cli/lsp/testing/execution.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-04-26 14:46:49 -0400
committerGitHub <noreply@github.com>2022-04-26 14:46:49 -0400
commita1b4aa2ae60d215e38c6871fae690e34964a27d7 (patch)
treec41baf3067ca2a618bd458f1101bf9cf98506dae /cli/lsp/testing/execution.rs
parentf07f246ae8a158e33e81aa4ccf225cd536795f50 (diff)
fix(test): capture inherited stdout and stderr for subprocesses in test output (#14395)
Diffstat (limited to 'cli/lsp/testing/execution.rs')
-rw-r--r--cli/lsp/testing/execution.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs
index 93f3d9ba3..6f90e60a3 100644
--- a/cli/lsp/testing/execution.rs
+++ b/cli/lsp/testing/execution.rs
@@ -760,9 +760,8 @@ impl test::TestReporter for LspTestReporter {
.and_then(|v| v.last().map(|td| td.into()))
});
let value = match output {
- test::TestOutput::PrintStdout(value)
- | test::TestOutput::PrintStderr(value) => value.replace('\n', "\r\n"),
- test::TestOutput::Stdout(bytes) | test::TestOutput::Stderr(bytes) => {
+ test::TestOutput::String(value) => value.replace('\n', "\r\n"),
+ test::TestOutput::Bytes(bytes) => {
String::from_utf8_lossy(bytes).replace('\n', "\r\n")
}
};