This was noticed with:
trap '' PIPE && # 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).
# Check bad character at EOF
test $(env printf '\xC3' | fold | wc -c) = 1 || fail=1
-# Ensure bounded memory operation
-vm=$(get_min_ulimit_v_ fold /dev/null) && {
- yes | tr -d '\n' | (ulimit -v $(($vm+8000)) && fold 2>err) | head || fail=1
- compare /dev/null err || fail=1
-}
-
Exit $fail
fold /dev/zero
fold -b /dev/zero
fold -c /dev/zero
+fold --version; yes | tr -d '\\n' | fold
head -z -n-1 /dev/zero
join -a 1 -z /dev/zero /dev/null
# TODO: nl --version; yes | nl