1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: fix flaky captured_output (#15234)

This commit is contained in:
David Sherret 2022-07-18 13:20:15 -04:00 committed by GitHub
parent 89c1ad0303
commit 0d73eb3dd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -351,7 +351,12 @@ fn captured_output() {
let output_text = String::from_utf8(output.stdout).unwrap();
let start = output_text.find(output_start).unwrap() + output_start.len();
let end = output_text.find(output_end).unwrap();
let output_text = output_text[start..end].trim();
// replace zero width space that may appear in test output due
// to test runner output flusher
let output_text = output_text[start..end]
.replace('\u{200B}', "")
.trim()
.to_string();
let mut lines = output_text.lines().collect::<Vec<_>>();
// the output is racy on either stdout or stderr being flushed
// from the runtime into the rust code, so sort it... the main