From 0ea6b51bf038108ba62577f7585bc76413f1f199 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 11 May 2022 12:48:38 -0400 Subject: fix: stdout and stderr encoding on Windows (#14559) --- cli/tests/integration/repl_tests.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cli/tests/integration/repl_tests.rs') diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index 44036795f..0b69f8ebf 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -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( -- cgit v1.2.3