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

fix: clippy long literal lacking separators

This commit is contained in:
leon3s 2023-03-19 15:01:59 +01:00
parent 6de67cfc36
commit be51f9aa5b
3 changed files with 12 additions and 12 deletions

View file

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

View file

@ -130,7 +130,7 @@ mod linux_only {
} }
fn run_tee(proc: &mut UCommand) -> (String, Output) { 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)] #[allow(deprecated)]
let output = proc let output = proc

View file

@ -425,7 +425,7 @@ fn test_touch_set_date3() {
assert!(at.file_exists(file)); 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); let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime); assert_eq!(atime, mtime);
assert_eq!(atime, expected); assert_eq!(atime, expected);
@ -466,7 +466,7 @@ fn test_touch_set_date5() {
#[cfg(windows)] #[cfg(windows)]
let expected = FileTime::from_unix_time(67413, 23456700); let expected = FileTime::from_unix_time(67413, 23456700);
#[cfg(not(windows))] #[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); let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime); assert_eq!(atime, mtime);
@ -485,7 +485,7 @@ fn test_touch_set_date6() {
assert!(at.file_exists(file)); 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); let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime); assert_eq!(atime, mtime);
@ -504,7 +504,7 @@ fn test_touch_set_date7() {
assert!(at.file_exists(file)); 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); let (atime, mtime) = get_file_times(&at, file);
assert_eq!(atime, mtime); assert_eq!(atime, mtime);