1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

fix: match date -I error messages with GNU date (#4499)

* date: use value_parser to improve errors

* date: update panic! to unreachable inside impl From for Iso8601Format
This commit is contained in:
Surya Teja K 2023-03-17 01:20:37 +05:30 committed by GitHub
parent 4e03e6254f
commit bd6905cf59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -50,6 +50,13 @@ fn test_date_rfc_8601() {
}
}
#[test]
fn test_date_rfc_8601_invalid_arg() {
for param in ["--iso-8601", "--i"] {
new_ucmd!().arg(format!("{param}=@")).fails();
}
}
#[test]
fn test_date_rfc_8601_second() {
for param in ["--iso-8601", "--i"] {