Commit Graph
38 Commits
Author SHA1 Message Date
1eea517d37 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>
2025-12-31 20:20:50 +01:00
Christopher Dryden a79c4bc6b4 Only using imports on unix since more integration tests only supported on unix 2025-11-21 23:39:21 +00:00
Christopher Dryden 10bcf65afa Using the pty helper function for the more bin testing 2025-11-21 23:24:53 +00:00
Sylvestre Ledru 71b4de24e6 test: improve support non-utf-8 2025-08-14 10:54:04 +02:00
Sylvestre Ledru b54d999cc6 Fix more to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Martin Kunkel ff001139ea more: tests: cleanup processes in test_valid_arg
Added cleanup in test_alive to ensure all spawned processes are
terminated on successful test execution.

This also fixes a race condition that could occur: the check for
process is_alive might be executing while more is still parsing
the arguments.
2025-08-04 21:39:02 +02:00
Dorian Peron 6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +02:00
Aaron AngandSylvestre Ledru c8c4f525a2 test_more: use at_and_ucmd helper macro 2025-05-18 21:09:48 +02:00
Sylvestre Ledru a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Sylvestre Ledru a85539f530 Run cargo fmt on the tree 2025-03-24 21:33:12 +01:00
Daniel Hofstetter 5e6fa49ef5 more: fix incorrect tests 2024-03-22 15:13:53 +01:00
IdeflopandSylvestre Ledru a227af70bc test/more: test argument --pattern 2024-03-10 22:14:26 +01:00
96d96e7de3 more handle errors with multiple files (#4997)
* more handle errors with multiple files

* tests/more test refactor and new case

* tests/more new cases

* more: use show! and change exitstatus and adjust tests to new exitvalue

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-02-04 16:32:14 +01:00
Daniel Hofstetter 4992cb9b86 Use std::io::IsTerminal instead of is-terminal 2023-09-04 10:35:17 +02:00
Sylvestre Ledru bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
IdeflopandIdeflop c4c3a354f8 tests/more: test argument --from-line 2023-06-26 21:57:52 +02:00
IdeflopandIdeflop 479340306e more: implement arguments -u/--plain and -F/--from-line 2023-06-26 21:57:45 +02:00
Ideflop 6c98b23e80 more: implement arguments -n/--lines and --number 2023-05-29 14:36:18 +02:00
Ideflop 03dec5128c more: implement argument -s / --squeeze 2023-05-27 00:04:04 +02:00
tpeters 7cad501c2c more: add output check to test 2023-05-24 16:32:29 +02:00
ccdb76aef7 more: Update tests/by-util/test_more.rs
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-05-24 15:57:55 +02:00
tpeters 53ffd55bdf more: run test only on unix systems 2023-05-24 13:40:30 +02:00
tpeters 50bff30c67 more: add test and change error type 2023-05-23 18:03:25 +02:00
Daniel Hofstetter e844bdfebe more: remove empty "else"-branches in tests 2023-05-20 16:26:11 +02:00
Ideflop 2d1a9f6709 fix behavior of -c and -p commands 2023-05-20 08:56:50 +02:00