1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

fix clippy tests

This commit is contained in:
n4n5 2024-06-30 16:27:08 +02:00
parent 81de2be5ab
commit ab67947321
No known key found for this signature in database
GPG key ID: 79414EADC6D4B457
31 changed files with 1259 additions and 888 deletions

View file

@ -106,7 +106,7 @@ fn test_very_large_range() {
.collect();
assert_eq!(result_seq.len(), num_samples, "Miscounted output length!");
assert!(
result_seq.iter().all(|x| (0..=1234567890).contains(x)),
result_seq.iter().all(|x| (0..=1_234_567_890).contains(x)),
"Output includes element not from range: {}",
result.stdout_str()
);
@ -132,7 +132,7 @@ fn test_very_large_range_offset() {
assert!(
result_seq
.iter()
.all(|x| (1234567890..=2147483647).contains(x)),
.all(|x| (1_234_567_890..=2_147_483_647).contains(x)),
"Output includes element not from range: {}",
result.stdout_str()
);
@ -234,7 +234,13 @@ fn test_range_permute_no_overflow_0_max() {
#[test]
fn test_very_high_range_full() {
let input_seq = vec![
2147483641, 2147483642, 2147483643, 2147483644, 2147483645, 2147483646, 2147483647,
2_147_483_641,
2_147_483_642,
2_147_483_643,
2_147_483_644,
2_147_483_645,
2_147_483_646,
2_147_483_647,
];
let result = new_ucmd!().arg("-i2147483641-2147483647").succeeds();
result.no_stderr();
@ -320,7 +326,7 @@ fn test_echo_multi() {
.stdout_str()
.split('\n')
.filter(|x| !x.is_empty())
.map(|x| x.into())
.map(std::convert::Into::into)
.collect();
result_seq.sort_unstable();
assert_eq!(result_seq, ["a", "b", "c"], "Output is not a permutation");
@ -335,7 +341,7 @@ fn test_echo_postfix() {
.stdout_str()
.split('\n')
.filter(|x| !x.is_empty())
.map(|x| x.into())
.map(std::convert::Into::into)
.collect();
result_seq.sort_unstable();
assert_eq!(result_seq, ["a", "b", "c"], "Output is not a permutation");