Skip to content

Commit aac0b2e

Browse files
authored
add test for issue #12001
1 parent 1e6c887 commit aac0b2e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/by-util/test_date.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,3 +3007,12 @@ fn test_korean_time_zone() {
30073007
.succeeds()
30083008
.stdout_is("2026-01-15 01:00:00 UTC\n");
30093009
}
3010+
3011+
// https://github.com/uutils/coreutils/issues/12001
3012+
// date: width prefix in %N format specifier is ignored ( %3N, %6N always output full 9 nanosecond digits) #12001
3013+
#[test]
3014+
fn test_nanoseconds_width_prefix_ignored_issue12001() {
3015+
let result = new_ucmd!().arg("+%3N").succeeds();
3016+
// compare to 4 because of \n
3017+
assert_eq!(result.stdout().len(), 4);
3018+
}

0 commit comments

Comments
 (0)