mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
Merge pull request #5625 from cakebaker/du_fix_test_du_no_dereference
du: fix issue with dereference in test
This commit is contained in:
commit
355b4872b1
1 changed files with 13 additions and 6 deletions
|
@ -365,12 +365,19 @@ fn test_du_no_dereference() {
|
|||
.stdout_does_not_contain(symlink);
|
||||
|
||||
// ensure dereference "wins"
|
||||
ts.ucmd()
|
||||
.arg(arg)
|
||||
.arg("--dereference")
|
||||
.succeeds()
|
||||
.stdout_contains(symlink)
|
||||
.stdout_does_not_contain(dir);
|
||||
let result = ts.ucmd().arg(arg).arg("--dereference").succeeds();
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
let result_reference = unwrap_or_return!(expected_result(&ts, &[arg, "--dereference"]));
|
||||
|
||||
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…
Reference in a new issue