tests/readlink: follow clippy advice

This commit is contained in:
Niyaz Nigmatullin 2022-08-15 22:48:35 +03:00
parent e826ab5f0f
commit b74e2f9d9b

View file

@ -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);
}