mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
fix: re-enable test_raw_tty (#8509)
This commit is contained in:
parent
e6685f0f01
commit
8486b081ae
1 changed files with 6 additions and 6 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue