mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
test_du: ignore unsupported --time=birth
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user