mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests/du: replace call to 'ln' with call to 'AtPath::hard_link'
This commit is contained in:
parent
afb1b9efb4
commit
6a70d89e8c
1 changed files with 2 additions and 4 deletions
|
@ -129,11 +129,9 @@ fn _du_soft_link(s: &str) {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_du_hard_link() {
|
fn test_du_hard_link() {
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
|
let at = &scene.fixtures;
|
||||||
|
|
||||||
let result_ln = scene.cmd("ln").arg(SUB_FILE).arg(SUB_LINK).run();
|
at.hard_link(SUB_FILE, SUB_LINK);
|
||||||
if !result_ln.succeeded() {
|
|
||||||
scene.ccmd("ln").arg(SUB_FILE).arg(SUB_LINK).succeeds();
|
|
||||||
}
|
|
||||||
|
|
||||||
let result = scene.ucmd().arg(SUB_DIR_LINKS).succeeds();
|
let result = scene.ucmd().arg(SUB_DIR_LINKS).succeeds();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue