mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
Merge pull request #5447 from cakebaker/ls_time_style_diag
ls: return exit code 2 for invalid time-style
This commit is contained in:
commit
2e7d37ce86
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…
Reference in a new issue