fix: stdout and stderr encoding on Windows (#14559)

This commit is contained in:
David Sherret 2022-05-11 12:48:38 -04:00 committed by GitHub
parent b67f874b3f
commit 0ea6b51bf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 262 additions and 187 deletions

View file

@ -206,6 +206,20 @@ fn pty_assign_global_this() {
});
}
#[test]
fn pty_emoji() {
// windows was having issues displaying this
util::with_pty(&["repl"], |mut console| {
console.write_line("console.log('🦕');");
console.write_line("close();");
let output = console.read_all_output();
// one for input, one for output
let emoji_count = output.chars().filter(|c| *c == '🦕').count();
assert_eq!(emoji_count, 2);
});
}
#[test]
fn console_log() {
let (out, err) = util::run_and_collect_output(