mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
numfmt: reject suffix if unit is "none"
This commit is contained in:
parent
db2e5fc6ec
commit
9e44acf307
2 changed files with 22 additions and 0 deletions
|
@ -646,3 +646,19 @@ fn test_invalid_unit_size() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_valid_but_forbidden_suffix() {
|
||||
let numbers = vec!["12K", "12Ki"];
|
||||
|
||||
for number in numbers {
|
||||
new_ucmd!()
|
||||
.arg(number)
|
||||
.fails()
|
||||
.code_is(2)
|
||||
.stderr_contains(format!(
|
||||
"rejecting suffix in input: '{}' (consider using --from)",
|
||||
number
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue