From b68d8a975d86d0123b93c3a0ff8c08586be0bc09 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 22 Jun 2025 19:24:12 +0200 Subject: [PATCH] sort: add a test we were not covering --- tests/by-util/test_sort.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/by-util/test_sort.rs b/tests/by-util/test_sort.rs index 3fcd4e978..c851f52f1 100644 --- a/tests/by-util/test_sort.rs +++ b/tests/by-util/test_sort.rs @@ -1054,6 +1054,12 @@ fn test_batch_size_invalid() { .fails_with_code(2) .stderr_contains("sort: invalid --batch-size argument '0'") .stderr_contains("sort: minimum --batch-size argument is '2'"); + // with -m, the error path is a bit different + TestScenario::new(util_name!()) + .ucmd() + .args(&["-m", "--batch-size=a"]) + .fails_with_code(2) + .stderr_contains("sort: invalid --batch-size argument 'a'"); } #[test]