mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
Merge pull request #4548 from papparapa/test-du-clippy-if-not-else
test_du: fix unnecessary boolean operation
This commit is contained in:
commit
10b4aeb2c8
1 changed files with 15 additions and 15 deletions
|
@ -82,10 +82,10 @@ fn _du_basics_subdir(s: &str) {
|
|||
))]
|
||||
fn _du_basics_subdir(s: &str) {
|
||||
// MS-WSL linux has altered expected output
|
||||
if !uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "8\tsubdir/deeper\n");
|
||||
} else {
|
||||
if uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "0\tsubdir/deeper\n");
|
||||
} else {
|
||||
assert_eq!(s, "8\tsubdir/deeper\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,10 +164,10 @@ fn _du_soft_link(s: &str) {
|
|||
))]
|
||||
fn _du_soft_link(s: &str) {
|
||||
// MS-WSL linux has altered expected output
|
||||
if !uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "16\tsubdir/links\n");
|
||||
} else {
|
||||
if uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "8\tsubdir/links\n");
|
||||
} else {
|
||||
assert_eq!(s, "16\tsubdir/links\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,10 +212,10 @@ fn _du_hard_link(s: &str) {
|
|||
))]
|
||||
fn _du_hard_link(s: &str) {
|
||||
// MS-WSL linux has altered expected output
|
||||
if !uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "16\tsubdir/links\n");
|
||||
} else {
|
||||
if uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "8\tsubdir/links\n");
|
||||
} else {
|
||||
assert_eq!(s, "16\tsubdir/links\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,10 +255,10 @@ fn _du_d_flag(s: &str) {
|
|||
))]
|
||||
fn _du_d_flag(s: &str) {
|
||||
// MS-WSL linux has altered expected output
|
||||
if !uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "28\t./subdir\n36\t.\n");
|
||||
} else {
|
||||
if uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "8\t./subdir\n8\t.\n");
|
||||
} else {
|
||||
assert_eq!(s, "28\t./subdir\n36\t.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,10 +303,10 @@ fn _du_dereference(s: &str) {
|
|||
))]
|
||||
fn _du_dereference(s: &str) {
|
||||
// MS-WSL linux has altered expected output
|
||||
if !uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "8\tsubdir/links/deeper_dir\n24\tsubdir/links\n");
|
||||
} else {
|
||||
if uucore::os::is_wsl_1() {
|
||||
assert_eq!(s, "0\tsubdir/links/deeper_dir\n8\tsubdir/links\n");
|
||||
} else {
|
||||
assert_eq!(s, "8\tsubdir/links/deeper_dir\n24\tsubdir/links\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue