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

tests ~ fix cargo clippy complaint (clippy::needless_borrow)

This commit is contained in:
Roy Ivy III 2021-06-06 14:13:54 -05:00
parent 8f0d42da39
commit 0dc8c18bac
4 changed files with 21 additions and 21 deletions

View file

@ -398,7 +398,7 @@ fn test_ls_long_formats() {
.arg("--author")
.arg("test-long-formats")
.succeeds();
assert!(re_three.is_match(&result.stdout_str()));
assert!(re_three.is_match(result.stdout_str()));
#[cfg(unix)]
{
@ -701,20 +701,20 @@ fn test_ls_styles() {
.arg("-l")
.arg("--time-style=full-iso")
.succeeds();
assert!(re_full.is_match(&result.stdout_str()));
assert!(re_full.is_match(result.stdout_str()));
//long-iso
let result = scene
.ucmd()
.arg("-l")
.arg("--time-style=long-iso")
.succeeds();
assert!(re_long.is_match(&result.stdout_str()));
assert!(re_long.is_match(result.stdout_str()));
//iso
let result = scene.ucmd().arg("-l").arg("--time-style=iso").succeeds();
assert!(re_iso.is_match(&result.stdout_str()));
assert!(re_iso.is_match(result.stdout_str()));
//locale
let result = scene.ucmd().arg("-l").arg("--time-style=locale").succeeds();
assert!(re_locale.is_match(&result.stdout_str()));
assert!(re_locale.is_match(result.stdout_str()));
//Overwrite options tests
let result = scene
@ -723,19 +723,19 @@ fn test_ls_styles() {
.arg("--time-style=long-iso")
.arg("--time-style=iso")
.succeeds();
assert!(re_iso.is_match(&result.stdout_str()));
assert!(re_iso.is_match(result.stdout_str()));
let result = scene
.ucmd()
.arg("--time-style=iso")
.arg("--full-time")
.succeeds();
assert!(re_full.is_match(&result.stdout_str()));
assert!(re_full.is_match(result.stdout_str()));
let result = scene
.ucmd()
.arg("--full-time")
.arg("--time-style=iso")
.succeeds();
assert!(re_iso.is_match(&result.stdout_str()));
assert!(re_iso.is_match(result.stdout_str()));
let result = scene
.ucmd()
@ -743,7 +743,7 @@ fn test_ls_styles() {
.arg("--time-style=iso")
.arg("--full-time")
.succeeds();
assert!(re_full.is_match(&result.stdout_str()));
assert!(re_full.is_match(result.stdout_str()));
let result = scene
.ucmd()
@ -751,7 +751,7 @@ fn test_ls_styles() {
.arg("-x")
.arg("-l")
.succeeds();
assert!(re_full.is_match(&result.stdout_str()));
assert!(re_full.is_match(result.stdout_str()));
at.touch("test2");
let result = scene.ucmd().arg("--full-time").arg("-x").succeeds();