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

numfmt: allow ' ' as field separator

This commit is contained in:
Daniel Hofstetter 2022-11-01 10:04:46 +01:00
parent 614c367e46
commit 2d4810b91b
3 changed files with 8 additions and 3 deletions

View file

@ -373,6 +373,11 @@ fn test_format_selected_fields() {
.args(&["--from=auto", "--field", "1,4,3", "1K 2K 3K 4K 5K 6K"])
.succeeds()
.stdout_only("1000 2K 3000 4000 5K 6K\n");
new_ucmd!()
.args(&["--from=auto", "--field", "1,4 3", "1K 2K 3K 4K 5K 6K"])
.succeeds()
.stdout_only("1000 2K 3000 4000 5K 6K\n");
}
#[test]
@ -401,7 +406,7 @@ fn test_format_selected_field_range() {
#[test]
fn test_format_all_fields() {
let all_fields_patterns = vec!["-", "-,3", "3,-", "1,-,3"];
let all_fields_patterns = vec!["-", "-,3", "3,-", "1,-,3", "- 3"];
for pattern in all_fields_patterns {
new_ucmd!()