mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
numfmt: use UResult in more functions
This commit replaces generic Results with UResults in some key functions in numfmt. As a result of this, we can provide different exit codes for different errors, which resolves ~70 failing test cases in the GNU numfmt.pl test suite.
This commit is contained in:
parent
ec386fa460
commit
9b04c98ddb
3 changed files with 67 additions and 20 deletions
|
@ -568,3 +568,8 @@ fn test_suffix_with_padding() {
|
|||
.succeeds()
|
||||
.stdout_only(" 1000pad 2000 3000\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_number_returns_status_2() {
|
||||
new_ucmd!().pipe_in("hello").fails().code_is(2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue