From b00b1b3cc748f0a2eba9f0aa6fbf33747d951b28 Mon Sep 17 00:00:00 2001 From: naoNao89 <90588855+naoNao89@users.noreply.github.com> Date: Thu, 11 Dec 2025 04:26:50 +0700 Subject: [PATCH 1/2] test(more): Fix test_from_line_option race condition by increasing PTY delay Increased the delay in run_more_with_pty() from 100ms to 500ms to allow more time to fully render output before the test reads from the PTY. The test was failing because it was reading too early, before more could initialize the terminal and render the file content. The -F flag itself works correctly. --- tests/by-util/test_more.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/by-util/test_more.rs b/tests/by-util/test_more.rs index 2bf130a1858..e6bae7f3077 100644 --- a/tests/by-util/test_more.rs +++ b/tests/by-util/test_more.rs @@ -35,7 +35,7 @@ fn run_more_with_pty( .arg(file) .run_no_wait(); - child.delay(100); + child.delay(500); let mut output = vec![0u8; 1024]; let n = read(&controller, &mut output).unwrap(); let output_str = String::from_utf8_lossy(&output[..n]).to_string(); From 77062fd549cca5f73257c77e8da653ef99d974d7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 30 Dec 2025 22:40:23 +0100 Subject: [PATCH 2/2] test_more: decrease the delay --- tests/by-util/test_more.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/by-util/test_more.rs b/tests/by-util/test_more.rs index e6bae7f3077..b5256af6174 100644 --- a/tests/by-util/test_more.rs +++ b/tests/by-util/test_more.rs @@ -35,7 +35,7 @@ fn run_more_with_pty( .arg(file) .run_no_wait(); - child.delay(500); + child.delay(200); let mut output = vec![0u8; 1024]; let n = read(&controller, &mut output).unwrap(); let output_str = String::from_utf8_lossy(&output[..n]).to_string();