numfmt: add --unit-separator option for output formatting #10108
+39
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe the reason this option doesn't exist yet is that it was added fairly recently. This option allows you to customize the separator between the unit and the number. Of all of the remaining 72 failing GNU numfmt tests this represents 12 of the failing tests.
The logic for the output is fairly straightforward to just pass it onto the
transform_tofunction and adding the additional formatting option. This feature is still not fully implemented and it has 4 associated failures that relate to parsing when being provided the unit-seperator. I was hoping to split the implementation of the option and the transform to from that PR since theres other issues causing failing tests with the parser, so I was hoping to keep the two fixes separate.