1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-17 13:27:49 +00:00

Merge pull request #6471 from RenjiSann/main

tests(date): Add tests for #6392
This commit is contained in:
Daniel Hofstetter 2024-07-11 09:26:58 +02:00 committed by GitHub
commit 399da70c15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -420,6 +420,21 @@ fn test_invalid_date_string() {
.stderr_contains("invalid date");
}
#[test]
fn test_date_one_digit_date() {
new_ucmd!()
.arg("-d")
.arg("2000-1-1")
.succeeds()
.stdout_contains("Sat Jan 1 00:00:00 2000");
new_ucmd!()
.arg("-d")
.arg("2000-1-4")
.succeeds()
.stdout_contains("Tue Jan 4 00:00:00 2000");
}
#[test]
fn test_date_overflow() {
new_ucmd!()