mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
date: make sure 'invalid date' message also returns exit code 1
This commit is contained in:
parent
24fb3897c3
commit
1b1446ce0c
2 changed files with 15 additions and 2 deletions
|
@ -232,3 +232,13 @@ fn test_invalid_format_string() {
|
|||
result.no_stdout();
|
||||
assert!(result.stderr_str().starts_with("date: invalid format "));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_date_string() {
|
||||
new_ucmd!()
|
||||
.arg("-d")
|
||||
.arg("foo")
|
||||
.fails()
|
||||
.no_stdout()
|
||||
.stderr_contains("invalid date");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue