Skip to content

Commit

Permalink
fix: re-enable test_raw_tty (denoland#8509)
Browse files Browse the repository at this point in the history
  • Loading branch information
ry authored Nov 26, 2020
1 parent e6685f0 commit 8486b08
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cli/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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");
Expand Down

0 comments on commit 8486b08

Please sign in to comment.