1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

Merge pull request #7154 from jfinkels/ls-time-style-timezone-abbrev

ls: display %Z alphabetic time zone abbreviation
This commit is contained in:
Daniel Hofstetter 2025-01-18 16:54:16 +01:00 committed by GitHub
commit 79f4b8976c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 91 additions and 43 deletions

View file

@ -5628,3 +5628,14 @@ fn test_non_unicode_names() {
.succeeds()
.stdout_is_bytes(b"\xC0.dir\n\xC0.file\n");
}
#[test]
fn test_time_style_timezone_name() {
let re_custom_format = Regex::new(r"[a-z-]* \d* [\w.]* [\w.]* \d* UTC f\n").unwrap();
let (at, mut ucmd) = at_and_ucmd!();
at.touch("f");
ucmd.env("TZ", "UTC0")
.args(&["-l", "--time-style=+%Z"])
.succeeds()
.stdout_matches(&re_custom_format);
}