mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tests(date): Add tests for #6392
These tests check that days and month with a single digit are correctly handled.
This commit is contained in:
@@ -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!()
|
||||
|
||||
Reference in New Issue
Block a user