1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 03:26:18 +00:00

Merge pull request #5979 from BenWiederhake/dev-shuf-null-input

shuf: Treat empty file as zero elements instead of one emptystring
This commit is contained in:
Daniel Hofstetter 2024-02-16 09:19:44 +01:00 committed by GitHub
commit bfe6f0f004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View file

@ -48,6 +48,13 @@ fn test_zero_termination() {
assert_eq!(result_seq, input_seq, "Output is not a permutation");
}
#[test]
fn test_empty_input() {
let result = new_ucmd!().pipe_in(vec![]).succeeds();
result.no_stderr();
result.no_stdout();
}
#[test]
fn test_echo() {
let input_seq = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];