1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

test: du: Skip nondynamic comparison on linux for test_du_bytes

The `test_du_bytes` testcase for the `du --bytes` command is written to perform
a dynamic comparison on linux hosts, i.e. it compares the output of the command
to that of the hosts `du` from the GNU coreutils.

Previously the test was written such that it would *first* perform the dynamic
comparison, and *after that* continue to a static comparison which may fail for
specific hosts that have a filesystem different from what the test expects.

This patch excludes linux hosts from the static comparison to ensure the test
performs only the dynamic comparison.
This commit is contained in:
Andreas Hartmann 2021-07-06 19:45:06 +02:00
parent 9ad70a4f5d
commit f64b708410

View file

@ -579,7 +579,8 @@ fn test_du_bytes() {
#[cfg(all( #[cfg(all(
not(target_vendor = "apple"), not(target_vendor = "apple"),
not(target_os = "windows"), not(target_os = "windows"),
not(target_os = "freebsd") not(target_os = "freebsd"),
not(target_os = "linux")
))] ))]
result.stdout_contains("21529\t./subdir\n"); result.stdout_contains("21529\t./subdir\n");
} }