mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
date: Catch format string that is not supported by chrono (#4244)
* Catch format string that is not supported by chrono Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
This commit is contained in:
parent
76656aa2c6
commit
81a854a13e
2 changed files with 14 additions and 0 deletions
|
@ -356,6 +356,13 @@ fn test_invalid_format_string() {
|
|||
assert!(result.stderr_str().starts_with("date: invalid format "));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unsupported_format() {
|
||||
let result = new_ucmd!().arg("+%#z").fails();
|
||||
result.no_stdout();
|
||||
assert!(result.stderr_str().starts_with("date: invalid format %#z"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_date_string_human() {
|
||||
let date_formats = vec![
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue