mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 06:42:42 +00:00
tests/readlink: follow clippy advice
This commit is contained in:
parent
e826ab5f0f
commit
b74e2f9d9b
1 changed files with 18 additions and 19 deletions
|
@ -324,23 +324,22 @@ fn test_canonicalize_trailing_slash_subdir_missing() {
|
|||
fn test_canonicalize_trailing_slash_symlink_loop() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
at.relative_symlink_file("link5", "link5");
|
||||
for name in ["link5"] {
|
||||
scene.ucmd().args(&["-f", name]).fails().code_is(1);
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-f", &format!("./{}/", name)])
|
||||
.fails()
|
||||
.code_is(1);
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-f", &format!("{}/more", name)])
|
||||
.fails()
|
||||
.code_is(1);
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-f", &format!("./{}/more/", name)])
|
||||
.fails()
|
||||
.code_is(1);
|
||||
}
|
||||
let name = "link5";
|
||||
at.relative_symlink_file(name, name);
|
||||
scene.ucmd().args(&["-f", name]).fails().code_is(1);
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-f", &format!("./{}/", name)])
|
||||
.fails()
|
||||
.code_is(1);
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-f", &format!("{}/more", name)])
|
||||
.fails()
|
||||
.code_is(1);
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-f", &format!("./{}/more/", name)])
|
||||
.fails()
|
||||
.code_is(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue