mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
du/test_du: Fix ctime fallback on Windows, and test
This commit is contained in:
parent
96438f2086
commit
b8d81adcff
2 changed files with 4 additions and 1 deletions
|
|
@ -531,7 +531,7 @@ impl StatPrinter {
|
|||
uucore::time::format_system_time(&mut stdout(), time, &self.time_format, true)?;
|
||||
print!("\t");
|
||||
} else {
|
||||
println!("???\t");
|
||||
print!("???\t");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -640,6 +640,9 @@ fn test_du_time() {
|
|||
let re_change_birth =
|
||||
Regex::new(r"0\t[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}\tdate_test").unwrap();
|
||||
let result = ts.ucmd().arg("--time=ctime").arg("date_test").succeeds();
|
||||
#[cfg(windows)]
|
||||
result.stdout_only("0\t???\tdate_test\n"); // ctime not supported on Windows
|
||||
#[cfg(not(windows))]
|
||||
result.stdout_matches(&re_change_birth);
|
||||
|
||||
if birth_supported() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue