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

test_du: ignore unsupported --time=birth

This commit is contained in:
Syukron Rifail M 2021-07-19 06:55:11 +07:00
parent 45d2e09de0
commit 37c986b005

View file

@ -398,8 +398,7 @@ fn test_du_time() {
let result = ts.ucmd().arg("--time=ctime").arg("date_test").succeeds();
result.stdout_only("0\t2016-06-16 00:00\tdate_test\n");
#[cfg(not(target_env = "musl"))]
{
if birth_supported() {
use regex::Regex;
let re_birth =
@ -409,6 +408,16 @@ fn test_du_time() {
}
}
#[cfg(feature = "touch")]
fn birth_supported() -> bool {
let ts = TestScenario::new(util_name!());
let m = match std::fs::metadata(ts.fixtures.subdir) {
Ok(m) => m,
Err(e) => panic!("{}", e),
};
m.created().is_ok()
}
#[cfg(not(target_os = "windows"))]
#[cfg(feature = "chmod")]
#[test]