diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-11-26 12:59:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 12:59:03 -0500 |
commit | 8486b081ae1ab0f17ba857b80dba8c1811e5db84 (patch) | |
tree | b6a401ccd9bfc751ec2dd26faef1a1183d1d5cfa | |
parent | e6685f0f01b8a11a5eaff020f5babcfde76b3038 (diff) |
fix: re-enable test_raw_tty (#8509)
-rw-r--r-- | cli/tests/integration_tests.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 43b9e091b..8a6d1201f 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -171,15 +171,13 @@ fn no_color() { assert_eq!("noColor false", util::strip_ansi_codes(stdout_str)); } -// TODO re-enable. This hangs on macOS -// https://github.com/denoland/deno/issues/4262 #[cfg(unix)] #[test] -#[ignore] pub fn test_raw_tty() { use std::io::{Read, Write}; use util::pty::fork::*; - + let deno_exe = util::deno_exe_path(); + let deno_dir = TempDir::new().expect("tempdir fail"); let fork = Fork::from_ptmx().unwrap(); if let Ok(mut master) = fork.is_parent() { @@ -206,14 +204,16 @@ pub fn test_raw_tty() { t.local_flags.remove(termios::LocalFlags::ECHO); termios::tcsetattr(stdin_fd, termios::SetArg::TCSANOW, &t).unwrap(); - let deno_dir = TempDir::new().expect("tempdir fail"); - let mut child = Command::new(util::deno_exe_path()) + let mut child = Command::new(deno_exe) .env("DENO_DIR", deno_dir.path()) .current_dir(util::root_path()) .arg("run") + .arg("--unstable") .arg("cli/tests/raw_mode.ts") .stdin(Stdio::inherit()) .stdout(Stdio::inherit()) + // Warning: errors may be swallowed. Try to comment stderr null if + // experiencing problems. .stderr(Stdio::null()) .spawn() .expect("Failed to spawn script"); |