mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
shuf: include all echo args, not just the last
This commit is contained in:
parent
420dfe8a9b
commit
07e8f4c7a5
2 changed files with 22 additions and 0 deletions
|
@ -79,6 +79,27 @@ fn test_echo() {
|
|||
assert_eq!(result_seq, input_seq, "Output is not a permutation");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_echo_multi() {
|
||||
let result = new_ucmd!()
|
||||
.arg("-e")
|
||||
.arg("a")
|
||||
.arg("b")
|
||||
.arg("-e")
|
||||
.arg("c")
|
||||
.succeeds();
|
||||
result.no_stderr();
|
||||
|
||||
let mut result_seq: Vec<String> = result
|
||||
.stdout_str()
|
||||
.split('\n')
|
||||
.filter(|x| !x.is_empty())
|
||||
.map(|x| x.into())
|
||||
.collect();
|
||||
result_seq.sort_unstable();
|
||||
assert_eq!(result_seq, ["a", "b", "c"], "Output is not a permutation");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_head_count() {
|
||||
let repeat_limit = 5;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue