<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/fold, 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-09-21T15:37:26Z</updated>
<entry>
<title>tests: avoid false failure on older Linux kernels</title>
<updated>2025-09-21T15:37:26Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-09-21T15:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8a1f4344639795a783c0ccd39ba8f02282d833ce'/>
<id>urn:sha1:8a1f4344639795a783c0ccd39ba8f02282d833ce</id>
<content type='text'>
* tests/fold/fold-zero-width.sh: Check the shell was able to create
the redirection file, as intermittently on CentOS 5,6,7 this wasn't
the case, with the shell giving an xmalloc failure due to the ulimit.
Reported by William Bader and Bruno Haible.
</content>
</entry>
<entry>
<title>tests: fold: avoid false failures on Solaris 10</title>
<updated>2025-09-20T21:12:58Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-09-20T16:10:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=70eb250fd734d50d45314094b84a174c1ac07dec'/>
<id>urn:sha1:70eb250fd734d50d45314094b84a174c1ac07dec</id>
<content type='text'>
* tests/fold/fold-characters.sh: Ensure we have independent verification
of the width of characters before testing based on those widths.
* tests/fold/fold-zero-width.sh: Likewise.
* tests/fold/fold.pl: Only compare the exit status,
as the error message can be translated.
</content>
</entry>
<entry>
<title>tests: avoid false failure on CentOS 5,6,7</title>
<updated>2025-09-20T15:17:43Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-09-20T15:10:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7c217bd8accc08ea47fa81ab8d20822cac239281'/>
<id>urn:sha1:7c217bd8accc08ea47fa81ab8d20822cac239281</id>
<content type='text'>
* tests/fold/fold-zero-width.sh: Increase vm limit to avoid
failures on CentOS 5,6,7.  Match the limit used in write-errors.sh
as per commit v9.5-255-g0bd149403
</content>
</entry>
<entry>
<title>tests: fix issues with fold-characters.sh test</title>
<updated>2025-09-17T14:32:47Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-09-17T13:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=78502174a9cf88cfcdff70f355f30db77ebbd630'/>
<id>urn:sha1:78502174a9cf88cfcdff70f355f30db77ebbd630</id>
<content type='text'>
This was noticed with:

  trap '' PIPE &amp;&amp;  # Ignore SIGPIPE
  make check TESTS=tests/fold/fold-characters.sh SUBDIRS=.

* tests/fold/fold-characters.sh: Move memory limit test to ...
* tests/misc/write-errors.sh: ... which avoids "write error"
messages on stderr due to the ignored SIGPIPE.  It also protects
the fold invocation with a timeout(1) so that fold implementations
that don't exit promptly upon write error don't hang the test suite
(Like we would have done before commit v9.7-311-gc95c7ee76).
</content>
</entry>
<entry>
<title>fold: fix write error checks with invalid multi-byte input</title>
<updated>2025-09-16T17:41:51Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-09-16T15:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c95c7ee76ff4480125a15b8e53945b60e58de400'/>
<id>urn:sha1:c95c7ee76ff4480125a15b8e53945b60e58de400</id>
<content type='text'>
* src/fold.c (write_out): A new helper to check all writes.
(fold-file): Use write_out() for all writes.
* tests/fold/fold-zero-width.sh: Adjust to writing more
data in various patterns, rather than two buffers of NULs.
This is a more robust memory bound check, and the '\303' case
tests this particular logic change.
* NEWS: fold now exits immediately, not just promptly.
</content>
</entry>
<entry>
<title>tests: fold/fold-zero-width.sh: avoid false failure with ENOSPC</title>
<updated>2025-09-16T13:00:44Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-09-16T13:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dda853a4de23450085c064169399ffe2492a404a'/>
<id>urn:sha1:dda853a4de23450085c064169399ffe2492a404a</id>
<content type='text'>
* tests/fold/fold-zero-width.sh: Check relatively large test file
is created appropriately.  Also apply more idomatic wc -l usage.
</content>
</entry>
<entry>
<title>fold: fix out of bounds write with zero width characters</title>
<updated>2025-09-16T03:55:56Z</updated>
<author>
<name>Collin Funk</name>
<email>collin.funk1@gmail.com</email>
</author>
<published>2025-09-16T03:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=98e5418a38fa8e944d5b694ba2aa0c165092e63b'/>
<id>urn:sha1:98e5418a38fa8e944d5b694ba2aa0c165092e63b</id>
<content type='text'>
* src/fold.c (fold_file): Prefer putchar ('\n') to copying characters.
If we do not have room in the output buffer print it since it is not a
full line of text.
* tests/fold/fold-zero-width.sh: New test case.
* tests/local.mk (all_tests): Add it.
</content>
</entry>
<entry>
<title>tests: fold: check if multi-byte spaces are treated as blank</title>
<updated>2025-09-05T02:48:37Z</updated>
<author>
<name>Collin Funk</name>
<email>collin.funk1@gmail.com</email>
</author>
<published>2025-09-05T02:30:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=24fb014092ba8d831c25cd8757a6a738927bb743'/>
<id>urn:sha1:24fb014092ba8d831c25cd8757a6a738927bb743</id>
<content type='text'>
This avoids a test failure on FreeBSD 14, MacOS 15, and musl.
Fix suggested by Pádraig Brady in:
&lt;https://bugs.gnu.org/79301#32&gt;.
* tests/fold/fold-spaces.sh (isblank): New function. Only run the tests
if the character is treated as blank.
Fixes https://bugs.gnu.org/79301
</content>
</entry>
<entry>
<title>fold: fix handling of invalid multi-byte characters</title>
<updated>2025-08-29T01:57:13Z</updated>
<author>
<name>Collin Funk</name>
<email>collin.funk1@gmail.com</email>
</author>
<published>2025-08-28T01:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=89b9115da67d819e01b4aa541e4672b21e48b250'/>
<id>urn:sha1:89b9115da67d819e01b4aa541e4672b21e48b250</id>
<content type='text'>
* src/fold.c (fold_file): Continue the loop when we have buffered bytes
but nothing left to read from the file.
(adjust_column): Don't assume that the character is printable.
* tests/fold/fold-characters.sh: Add a new test case.
(bad_unicode): New function.
</content>
</entry>
<entry>
<title>tests: fold: add tests for multi-byte width</title>
<updated>2025-08-27T15:41:07Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2025-08-27T13:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4b35a3b9201742ddff56062a13cf20ce4e9bc9be'/>
<id>urn:sha1:4b35a3b9201742ddff56062a13cf20ce4e9bc9be</id>
<content type='text'>
* tests/fold/fold.pl: The i18n patch didn't actually test folding
of multi-byte characters, so add tests for various multi-byte forms.
</content>
</entry>
</feed>
