mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
numfmt: allow "-" in field list
This commit is contained in:
parent
b942054568
commit
27c233f294
2 changed files with 15 additions and 8 deletions
|
@ -401,10 +401,14 @@ fn test_format_selected_field_range() {
|
|||
|
||||
#[test]
|
||||
fn test_format_all_fields() {
|
||||
new_ucmd!()
|
||||
.args(&["--from=auto", "--field", "-", "1K 2K 3K 4K 5K 6K"])
|
||||
.succeeds()
|
||||
.stdout_only("1000 2000 3000 4000 5000 6000\n");
|
||||
let all_fields_patterns = vec!["-", "-,3", "3,-", "1,-,3"];
|
||||
|
||||
for pattern in all_fields_patterns {
|
||||
new_ucmd!()
|
||||
.args(&["--from=auto", "--field", pattern, "1K 2K 3K 4K 5K 6K"])
|
||||
.succeeds()
|
||||
.stdout_only("1000 2000 3000 4000 5000 6000\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue