1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

numfmt: accept shortcuts for stringly-enum arguments

This commit is contained in:
Ben Wiederhake 2024-04-01 08:06:18 +02:00
parent 3877d14504
commit 2646944bee
2 changed files with 12 additions and 1 deletions

View file

@ -550,10 +550,14 @@ fn test_delimiter_with_padding_and_fields() {
fn test_round() {
for (method, exp) in [
("from-zero", ["9.1K", "-9.1K", "9.1K", "-9.1K"]),
("from-zer", ["9.1K", "-9.1K", "9.1K", "-9.1K"]), // spell-checker:disable-line
("f", ["9.1K", "-9.1K", "9.1K", "-9.1K"]),
("towards-zero", ["9.0K", "-9.0K", "9.0K", "-9.0K"]),
("up", ["9.1K", "-9.0K", "9.1K", "-9.0K"]),
("down", ["9.0K", "-9.1K", "9.0K", "-9.1K"]),
("nearest", ["9.0K", "-9.0K", "9.1K", "-9.1K"]),
("near", ["9.0K", "-9.0K", "9.1K", "-9.1K"]),
("n", ["9.0K", "-9.0K", "9.1K", "-9.1K"]),
] {
new_ucmd!()
.args(&[