mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
uucore: add InvalidSuffix to ParseSizeError
This commit is contained in:
parent
e337826a11
commit
27dd59635a
10 changed files with 89 additions and 35 deletions
|
@ -827,7 +827,8 @@ fn test_traditional_only_label() {
|
|||
|
||||
#[test]
|
||||
fn test_od_invalid_bytes() {
|
||||
const INVALID_SIZE: &str = "1fb4t";
|
||||
const INVALID_SIZE: &str = "x";
|
||||
const INVALID_SUFFIX: &str = "1fb4t";
|
||||
const BIG_SIZE: &str = "1Y";
|
||||
|
||||
// NOTE:
|
||||
|
@ -852,6 +853,16 @@ fn test_od_invalid_bytes() {
|
|||
option, INVALID_SIZE
|
||||
));
|
||||
|
||||
new_ucmd!()
|
||||
.arg(format!("{}={}", option, INVALID_SUFFIX))
|
||||
.arg("file")
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_only(format!(
|
||||
"od: invalid suffix in {} argument '{}'",
|
||||
option, INVALID_SUFFIX
|
||||
));
|
||||
|
||||
#[cfg(not(target_pointer_width = "128"))]
|
||||
new_ucmd!()
|
||||
.arg(format!("{}={}", option, BIG_SIZE))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue