mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
shuf: fix error message text on negative-sized ranges
Found by @cakebaker: https://github.com/uutils/coreutils/pull/6011#discussion_r1501838317
This commit is contained in:
parent
4ee3f68e6a
commit
b233569b9c
2 changed files with 11 additions and 3 deletions
|
@ -762,7 +762,11 @@ fn test_range_empty() {
|
|||
|
||||
#[test]
|
||||
fn test_range_empty_minus_one() {
|
||||
new_ucmd!().arg("-i5-3").succeeds().no_output();
|
||||
new_ucmd!()
|
||||
.arg("-i5-3")
|
||||
.fails()
|
||||
.no_stdout()
|
||||
.stderr_only("shuf: invalid input range: '5-3'\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -792,5 +796,5 @@ fn test_range_repeat_empty_minus_one() {
|
|||
.arg("-ri5-3")
|
||||
.fails()
|
||||
.no_stdout()
|
||||
.stderr_only("shuf: no lines to repeat\n");
|
||||
.stderr_only("shuf: invalid input range: '5-3'\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue