mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
fix minrustv build error
This commit is contained in:
parent
afd7acb456
commit
4a84c15955
1 changed files with 4 additions and 4 deletions
|
@ -247,21 +247,21 @@ hello
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bad_utf8() {
|
fn test_bad_utf8() {
|
||||||
let bytes = b"\xfc\x80\x80\x80\x80\xaf";
|
let bytes: &[u8] = b"\xfc\x80\x80\x80\x80\xaf";
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.args(&["-c", "6"])
|
.args(&["-c", "6"])
|
||||||
.pipe_in(*bytes)
|
.pipe_in(bytes)
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_is_bytes(bytes);
|
.stdout_is_bytes(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bad_utf8_lines() {
|
fn test_bad_utf8_lines() {
|
||||||
let input = b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf";
|
let input: &[u8] = b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf";
|
||||||
let output = b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\n";
|
let output = b"\xfc\x80\x80\x80\x80\xaf\nb\xfc\x80\x80\x80\x80\xaf\n";
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.args(&["-n", "2"])
|
.args(&["-n", "2"])
|
||||||
.pipe_in(*input)
|
.pipe_in(input)
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_is_bytes(output);
|
.stdout_is_bytes(output);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue