Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clippy long literal lacking separators #4546

Merged
merged 2 commits into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/by-util/test_chmod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
Expand All @@ -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]
Expand Down Expand Up @@ -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
);
}

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_tee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/by-util/test_touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down