<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/misc/numfmt.pl, branch v9.8</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.8</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2025-01-01T09:33:08Z</updated>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2025-01-01T09:33:08Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-01-01T09:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=28b176085f04a6227d7fadd28a129b5cb02dfbf5'/>
<id>urn:sha1:28b176085f04a6227d7fadd28a129b5cb02dfbf5</id>
<content type='text'>
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* gnulib: Update included in this commit as copyright years
are the only change from the previous gnulib commit.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>numfmt: don't require a suffix with --from=iec-i</title>
<updated>2024-12-30T22:49:31Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2024-12-30T22:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6229ac946e6ee36158db1a592279671d79a9737a'/>
<id>urn:sha1:6229ac946e6ee36158db1a592279671d79a9737a</id>
<content type='text'>
* src/numfmt.c (simple_strtod_human): Only look for 'i'
after detecting a suffix.
* tests/misc/numfmt.pl: Add a test case.
* NEWS: Mention the bug fix.
Reported at https://bugs.debian.org/1091758
</content>
</entry>
<entry>
<title>tests: numfmt: fix false failures on some systems</title>
<updated>2024-03-26T20:09:35Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2024-03-26T19:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=606f54d157c3d9d558bdbe41da8d108993d86aeb'/>
<id>urn:sha1:606f54d157c3d9d558bdbe41da8d108993d86aeb</id>
<content type='text'>
* tests/misc/numfmt.pl: Verify that printf field width specs
count characters and not bytes before enabling locale tests.
This was seen on FreeBSD 14.0 and Solaris 11 OpenIndiana.
Reported by Bruno Haible
</content>
</entry>
<entry>
<title>tests: avoid false failure with partial locale info</title>
<updated>2024-03-25T18:40:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2024-03-25T18:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c0f02a8f5b164d72438168bce88328193ab39c34'/>
<id>urn:sha1:c0f02a8f5b164d72438168bce88328193ab39c34</id>
<content type='text'>
* tests/misc/numfmt.pl: Some systems with the fr_FR.UTF-8
locale installed, do not have a thousands grouping character defined.
In this case we skip the locale tests which depend on a non empty
grouping character.
</content>
</entry>
<entry>
<title>maint: update all copyright year number ranges</title>
<updated>2024-01-01T13:27:23Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2024-01-01T13:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a966dcdb69e2f49f2587e1b7d4ade7efcff29f40'/>
<id>urn:sha1:a966dcdb69e2f49f2587e1b7d4ade7efcff29f40</id>
<content type='text'>
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* gnulib: Update included in this commit as copyright years
are the only change from the previous gnulib commit.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Manually update copyright year,
until we fully sync with gnulib at a later stage.
* tests/sample-test: Adjust to use the single most recent year.
</content>
</entry>
<entry>
<title>tests: numfmt: fix test related to lower case 'k' SI unit</title>
<updated>2023-12-29T18:04:36Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-12-27T23:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=76ec516242679372f2c9891770335db17cbd9f7e'/>
<id>urn:sha1:76ec516242679372f2c9891770335db17cbd9f7e</id>
<content type='text'>
* tests/misc/numfmt.pl: Following on from v9.4-86-g615167cc4,
adjust this test accordingly.  This test was being skipped
on some systems, and so only noticed now.
Reported by Jim Meyering.
</content>
</entry>
<entry>
<title>tests: run locale tests on more systems</title>
<updated>2023-12-29T18:04:29Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-12-27T22:47:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ebb985dc410584c21cfd5a3fbcd2622346cecfa6'/>
<id>urn:sha1:ebb985dc410584c21cfd5a3fbcd2622346cecfa6</id>
<content type='text'>
* tests/misc/numfmt.pl: Determine the thousands grouping character
in use, rather than skipping locale tests when it's not a space.
For example fr_FR.UTF-8 uses "NARROW NO-BREAK SPACE" as the grouping
char on modern glibc systems at least.
* tests/sort/sort-h-thousands-sep.sh: Likewise.
</content>
</entry>
<entry>
<title>numfmt: support lowercase 'k' for Kilo and Kibi</title>
<updated>2023-11-27T19:41:49Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-11-26T16:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=615167cc4d88ab94c0e6f804ccc0787febf7cd0e'/>
<id>urn:sha1:615167cc4d88ab94c0e6f804ccc0787febf7cd0e</id>
<content type='text'>
For consistency with the "SI" standard, and with other coreutils
which output a lowercase 'k' in "SI" mode.

* src/numfmt.c (suffix_power): Treat 'k' like 'K' on input.
(double_to_human): Output lowercase 'k' in SI mode.
(usage): Adjust accordingly.
* doc/coreutils.texi: Mention 'k' accepted, and printed in SI mode.
* tests/misc/numfmt.pl: Adjust accordingly.
* NEWS: Mention the change in behavior.
Fixes https://bugs.gnu.org/47103
</content>
</entry>
<entry>
<title>maint: avoid syntax check failure</title>
<updated>2023-08-31T20:59:02Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-08-31T20:59:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=850a05644196444f619b613a74dc7089436660c6'/>
<id>urn:sha1:850a05644196444f619b613a74dc7089436660c6</id>
<content type='text'>
* tests/misc/numfmt.pl: Keep lines &lt;= 80 chars.
</content>
</entry>
<entry>
<title>maint: remove need for mbsalign</title>
<updated>2023-08-30T06:57:40Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-08-30T06:52:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cbb6dfec557e7c8ac2dd728e4a943beb6ccfd53c'/>
<id>urn:sha1:cbb6dfec557e7c8ac2dd728e4a943beb6ccfd53c</id>
<content type='text'>
This simplifies memory allocation a bit, and removes an arbitrary
limitation from numfmt, which formerly limited cell output to 127
bytes.
* bootstrap.conf (gnulib_modules): Remove mbsalign, strncat.
Add strnlen (the code already used strnlen directly, and we were
saved only because Gnulib used the module indirectly)
* gl/lib/mbsalign.c, gl/lib/mbsalign.h, gl/modules/mbsalign:
* gl/modules/mbsalign-tests, gl/tests/test-mbsalign.c: Remove.
* src/df.c, src/ls.c: Do not include mbsalign.h.
(MBSWIDTH_FLAGS): New constant, now used for all
mbswidth calls.  All callers changed to check for -1 return.
* src/df.c (struct field_data_t): ‘width’ is now int not size_t,
since mbswidth can’t do widths greater than INT_MAX anyway.
Replace ‘align’ with ‘align_right’.  All uses changed.
(print_table): Redo to avoid the need for ambsalign.
(get_header, get_dev): mbswidth returns int, not size_t.
* src/ls.c (MAX_MON_WIDTH): Remove; no longer used.
(abmon_init): Use strnlen to cheaply discard too-long month names.
Align by hand instead of using mbsalign.
* src/numfmt.c: Include stdckdint.h, mbswidth.h.
Do not include mbsalign.h.
(padding_buffer_size): Now idx_t.  All uses changed.
(padding_width): Now intmax_t, since it’s no longer an object
size.  Its sign now records alignment.  All uses changed.
(zero_padding_width): Now int, since it’s given to sprintf.
All uses changed.
(padding_alignment): Remove; it’s now taken from padding_width’s sign.
(double_to_human): Return string length.  BUF_SIZE arg is now idx_t.
Include suffix in output.  All callers changed.  Simplify by not
calling strncat or stpcpy.  Calculate fmt size bound more carefully.
(setup_padding_buffer): Remove.  All uses removed.
(parse_format_string): Use intmax_t, not long, for pad.
On overflow, set widths to large values that cause later code
to do the right thing, rather than separately checking for
overflow here.
(prepare_padded_number): Return bool, not int 0/1.  New arg
PADDING.  All uses changed.  Do not limit padded output to 127
bytes; instead, use xpalloc to expand the output buffer.
(print_padded_number): New arg PADDING.  All uses changed.
(process_suffixed_number): Simplify.
(main): Take extremum if xstrtoimax overflows, as this does
the right thing.
* tests/misc/numfmt.pl: New test suf-20 to test for truncation bug.
Remove tests pad-3.2, fmt-err-7, as they’re no longer invalid but
are quite expensive.
</content>
</entry>
</feed>
