mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
fix(test): capture inherited stdout and stderr for subprocesses in test output (#14395)
This commit is contained in:
parent
f07f246ae8
commit
a1b4aa2ae6
8 changed files with 84 additions and 33 deletions
|
@ -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")
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue