test(more): Fix test_from_line_option race condition by increasing PTY delay (#9629)

* 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.

* test_more: decrease the delay

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
This commit is contained in:
Cả thế giới là Rust
2025-12-31 20:20:50 +01:00
committed by GitHub
co-authored by Sylvestre Ledru
parent 4e3a860513
commit 1eea517d37
+1 -1
View File
@@ -35,7 +35,7 @@ fn run_more_with_pty(
.arg(file)
.run_no_wait();
child.delay(100);
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();