0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-02 04:38:21 -05:00

chore: fix repl::pty_emoji test on linux (#15166)

This commit is contained in:
David Sherret 2022-07-12 11:05:56 -04:00 committed by GitHub
parent 007e1b4bd5
commit 2ff3e8a6c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -217,13 +217,13 @@ fn pty_assign_global_this() {
fn pty_emoji() {
// windows was having issues displaying this
util::with_pty(&["repl"], |mut console| {
console.write_line("console.log('🦕');");
console.write_line(r#"console.log('\u{1F995}');"#);
console.write_line("close();");
let output = console.read_all_output();
// one for input, one for output
// only one for the output (since input is escaped)
let emoji_count = output.chars().filter(|c| *c == '🦕').count();
assert_eq!(emoji_count, 2);
assert_eq!(emoji_count, 1);
});
}