mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00: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:
parent
256b2ded82
commit
e4f89761a7
1 changed files with 15 additions and 0 deletions
|
@ -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!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue