diff options
author | Daniel Hofstetter <daniel.hofstetter@42dh.com> | 2024-07-11 09:26:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 09:26:58 +0200 |
commit | 399da70c15f5b6bc9eab2678939d57fe59a036f1 (patch) | |
tree | b149905c9f04a4ffa100fbe58b4a164bfe522509 | |
parent | 3450eb8ce178fbc0a9edfcf567c1bd758d2767c6 (diff) | |
parent | e4f89761a7c3578211110bc4e14403bcac3e4720 (diff) |
Merge pull request #6471 from RenjiSann/main
tests(date): Add tests for #6392
-rw-r--r-- | tests/by-util/test_date.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/by-util/test_date.rs b/tests/by-util/test_date.rs index bf9e1d86c..553414af8 100644 --- a/tests/by-util/test_date.rs +++ b/tests/by-util/test_date.rs @@ -421,6 +421,21 @@ fn test_invalid_date_string() { } #[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!() .arg("-d68888888888888sms") |