mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ls: return exit code 2 for invalid time-style
This commit is contained in:
parent
769eb29cd3
commit
6f84e56e28
2 changed files with 7 additions and 2 deletions
|
@ -183,7 +183,7 @@ impl UError for LsError {
|
|||
Self::BlockSizeParseError(_) => 1,
|
||||
Self::ConflictingArgumentDired() => 1,
|
||||
Self::AlreadyListedError(_) => 2,
|
||||
Self::TimeStyleParseError(_, _) => 1,
|
||||
Self::TimeStyleParseError(_, _) => 2,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1737,7 +1737,12 @@ fn test_ls_styles() {
|
|||
.stdout_matches(&re_custom_format);
|
||||
|
||||
// Also fails due to not having full clap support for time_styles
|
||||
scene.ucmd().arg("-l").arg("-time-style=invalid").fails();
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("-l")
|
||||
.arg("--time-style=invalid")
|
||||
.fails()
|
||||
.code_is(2);
|
||||
|
||||
//Overwrite options tests
|
||||
scene
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue