1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-02 05:57:46 +00:00

sort: do not exit with failure for "--version" or "--help"

This commit is contained in:
Michael Debertol 2021-07-31 23:58:33 +02:00
parent 103a9d52ff
commit 663c9751a1
2 changed files with 34 additions and 3 deletions

View file

@ -1020,3 +1020,20 @@ fn test_separator_null() {
.succeeds()
.stdout_only("a\0z\0z\nz\0b\0a\nz\0a\0b\n");
}
#[test]
fn test_no_error_for_version() {
new_ucmd!()
.arg("--version")
.succeeds()
.stdout_contains("sort");
}
#[test]
fn test_wrong_args_exit_code() {
new_ucmd!()
.arg("--misspelled")
.fails()
.status_code(2)
.stderr_contains("--misspelled");
}