mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #2505 from syukronrm/du-time-birth
test_du: ignore unsupported --time=birth
This commit is contained in:
commit
e86c989184
1 changed files with 11 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue