mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
numfmt: fix zero-padding placement for negative numbers (#11694)
* numfmt: fix zero-padding placement before sign for negative numbers When using zero-padded format (e.g. %018.2f), the sign character is now placed before the padding zeros, matching C printf behavior. Fixes #11664 * numfmt: simplify sign handling with combined strip_prefix
This commit is contained in:
@@ -1428,7 +1428,6 @@ fn test_from_unit_fractional_precision_issue_11663() {
|
||||
// Zero-padded `--format` places padding zeros before the sign for negative
|
||||
// numbers; GNU (and C printf) puts the sign first.
|
||||
#[test]
|
||||
#[ignore = "GNU compat: see uutils/coreutils#11664"]
|
||||
fn test_zero_pad_sign_order_issue_11664() {
|
||||
new_ucmd!()
|
||||
.args(&["--from=none", "--format=%018.2f", "--", "-9869647"])
|
||||
|
||||
Reference in New Issue
Block a user