mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
du: fix issue with dereference in test
This commit is contained in:
parent
7695fe3fb3
commit
c111dc88ac
1 changed files with 13 additions and 6 deletions
|
@ -365,12 +365,19 @@ fn test_du_no_dereference() {
|
||||||
.stdout_does_not_contain(symlink);
|
.stdout_does_not_contain(symlink);
|
||||||
|
|
||||||
// ensure dereference "wins"
|
// ensure dereference "wins"
|
||||||
ts.ucmd()
|
let result = ts.ucmd().arg(arg).arg("--dereference").succeeds();
|
||||||
.arg(arg)
|
|
||||||
.arg("--dereference")
|
#[cfg(target_os = "linux")]
|
||||||
.succeeds()
|
{
|
||||||
.stdout_contains(symlink)
|
let result_reference = unwrap_or_return!(expected_result(&ts, &[arg, "--dereference"]));
|
||||||
.stdout_does_not_contain(dir);
|
|
||||||
|
if result_reference.succeeded() {
|
||||||
|
assert_eq!(result.stdout_str(), result_reference.stdout_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "linux"))]
|
||||||
|
result.stdout_contains(symlink).stdout_does_not_contain(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue