From 5d27c19853e3dbc4579b4d89d81e970b4f1d5e33 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Mon, 31 Oct 2022 09:26:28 +0100 Subject: [PATCH] numfmt: add test for "--field -" (all fields) --- tests/by-util/test_numfmt.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/by-util/test_numfmt.rs b/tests/by-util/test_numfmt.rs index 49de861fb..bcae09aa3 100644 --- a/tests/by-util/test_numfmt.rs +++ b/tests/by-util/test_numfmt.rs @@ -399,6 +399,14 @@ fn test_format_selected_field_range() { .stdout_only("1K 2000 3000 4000 5000 6K\n"); } +#[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"); +} + #[test] fn test_should_succeed_if_range_out_of_bounds() { new_ucmd!()