From 5ae2665bb44a4e093845bf4747913b5ea6b88b86 Mon Sep 17 00:00:00 2001 From: YizhePKU Date: Mon, 3 Jun 2024 07:49:20 +0800 Subject: [PATCH] Re-enable test on MacOS --- crates/nu-test-support/src/terminal.rs | 6 ++++-- tests/main.rs | 1 - tests/terminal/mod.rs | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/nu-test-support/src/terminal.rs b/crates/nu-test-support/src/terminal.rs index c81100290b..97a051a5ea 100644 --- a/crates/nu-test-support/src/terminal.rs +++ b/crates/nu-test-support/src/terminal.rs @@ -10,8 +10,10 @@ //! will create one for you with sensible defaults. //! //! Step 2: Create a PTY and spawn a Nushell process to the slave end. -//! `pty_with_nushell()` will do that for you. It's probably a good idea to pass -//! `--no-config-file` as argument to Nushell. +//! `pty_with_nushell()` will do that for you. Here you can set PWD or pass +//! command line arguments to Nushell. It's always a good idea to pass +//! `--no-config-file`, otherwise Nushell will ask if you want to create one +//! with default, and that messes up the input. //! //! Step 3: Wait for Nushell to initialize (sleeping for 500ms should do). On //! Linux, trying to write to the PTY before Nushell finishes initialization diff --git a/tests/main.rs b/tests/main.rs index 5821d754ad..dddf851151 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -14,5 +14,4 @@ mod plugins; mod repl; mod scope; mod shell; -#[cfg(not(target_os = "macos"))] mod terminal; diff --git a/tests/terminal/mod.rs b/tests/terminal/mod.rs index 75f3cd6d9c..72f0a5212a 100644 --- a/tests/terminal/mod.rs +++ b/tests/terminal/mod.rs @@ -79,8 +79,5 @@ fn command_hints_are_pwd_aware() { // Examine the terminal state. let (row, _col) = extract_cursor(&term); let text = extract_text(&term); - for line in &text { - println!("{}", line); - } assert!(text[row - 2].contains("print 'FOO'")); }