mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
uniq: Fix panic on invalid utf-8 input
This commit is contained in:
parent
4574b2b58d
commit
ce4342d12e
3 changed files with 18 additions and 3 deletions
|
@ -138,3 +138,12 @@ fn test_stdin_zero_terminated() {
|
|||
.run()
|
||||
.stdout_is_fixture("sorted-zero-terminated.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_utf8() {
|
||||
new_ucmd!()
|
||||
.arg("not-utf8-sequence.txt")
|
||||
.run()
|
||||
.failure()
|
||||
.stderr_only("uniq: error: invalid utf-8 sequence of 1 bytes from index 0");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue