Merge pull request #4546 from leon3s/fix-test-sort-literal-lacking-separator

fix: clippy long literal lacking separators
This commit is contained in:
Sylvestre Ledru 2023-03-19 19:45:12 +01:00 committed by GitHub
commit c611176878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 13 deletions

View file

@ -545,8 +545,8 @@ fn test_mode_after_dash_dash() {
run_single_test(
&TestCase {
args: vec!["--", "-r", TEST_FILE],
before: 0o100777,
after: 0o100333,
before: 0o100_777,
after: 0o100_333,
},
&at,
ucmd,
@ -570,7 +570,7 @@ fn test_chmod_file_after_non_existing_file() {
.stderr_contains("chmod: cannot access 'does-not-exist': No such file or directory")
.code_is(1);
assert_eq!(at.metadata(TEST_FILE).permissions().mode(), 0o100764);
assert_eq!(at.metadata(TEST_FILE).permissions().mode(), 0o100_764);
scene
.ucmd()
@ -581,7 +581,7 @@ fn test_chmod_file_after_non_existing_file() {
.fails()
.no_stderr()
.code_is(1);
assert_eq!(at.metadata("file2").permissions().mode(), 0o100764);
assert_eq!(at.metadata("file2").permissions().mode(), 0o100_764);
}
#[test]
@ -617,7 +617,7 @@ fn test_chmod_file_symlink_after_non_existing_file() {
.stderr_contains(expected_stderr);
assert_eq!(
at.metadata(test_existing_symlink).permissions().mode(),
0o100764
0o100_764
);
}
@ -679,8 +679,8 @@ fn test_gnu_repeating_options() {
fn test_gnu_special_filenames() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
let perms_before = Permissions::from_mode(0o100640);
let perms_after = Permissions::from_mode(0o100440);
let perms_before = Permissions::from_mode(0o100_640);
let perms_after = Permissions::from_mode(0o100_440);
make_file(&at.plus_as_string("--"), perms_before.mode());
scene.ucmd().arg("-w").arg("--").arg("--").succeeds();

View file

@ -1133,7 +1133,7 @@ fn test_tmp_files_deleted_on_sigint() {
for _ in 0..40 {
let lines = rand_pcg::Pcg32::seed_from_u64(123)
.sample_iter(rand::distributions::uniform::Uniform::new(0, 10000))
.take(100000)
.take(100_000)
.map(|x| x.to_string() + "\n")
.collect::<String>();
file.write_all(lines.as_bytes()).unwrap();

View file

@ -130,7 +130,7 @@ mod linux_only {
}
fn run_tee(proc: &mut UCommand) -> (String, Output) {
let content = (1..=100000).map(|x| format!("{x}\n")).collect::<String>();
let content = (1..=100_000).map(|x| format!("{x}\n")).collect::<String>();
#[allow(deprecated)]
let output = proc

View file

@ -425,7 +425,7 @@ fn test_touch_set_date3() {
assert!(at.file_exists(file));
let expected = FileTime::from_unix_time(1623786360, 0);
let expected = FileTime::from_unix_time(1_623_786_360, 0);
let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime);
assert_eq!(atime, expected);
@ -466,7 +466,7 @@ fn test_touch_set_date5() {
#[cfg(windows)]
let expected = FileTime::from_unix_time(67413, 23456700);
#[cfg(not(windows))]
let expected = FileTime::from_unix_time(67413, 23456789);
let expected = FileTime::from_unix_time(67413, 23_456_789);
let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime);
@ -485,7 +485,7 @@ fn test_touch_set_date6() {
assert!(at.file_exists(file));
let expected = FileTime::from_unix_time(946684800, 0);
let expected = FileTime::from_unix_time(946_684_800, 0);
let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime);
@ -504,7 +504,7 @@ fn test_touch_set_date7() {
assert!(at.file_exists(file));
let expected = FileTime::from_unix_time(1074254400, 0);
let expected = FileTime::from_unix_time(1_074_254_400, 0);
let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime);