tests/du: replace call to 'ln' with call to 'AtPath::hard_link'

This commit is contained in:
Jan Scheer 2021-05-26 12:55:53 +02:00
parent afb1b9efb4
commit 6a70d89e8c

View file

@ -129,11 +129,9 @@ fn _du_soft_link(s: &str) {
#[test]
fn test_du_hard_link() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
let result_ln = scene.cmd("ln").arg(SUB_FILE).arg(SUB_LINK).run();
if !result_ln.succeeded() {
scene.ccmd("ln").arg(SUB_FILE).arg(SUB_LINK).succeeds();
}
at.hard_link(SUB_FILE, SUB_LINK);
let result = scene.ucmd().arg(SUB_DIR_LINKS).succeeds();