`install -s --strip-program=PROG` aborted with an Option::unwrap panic when
PROG was terminated by a signal: the strip-failure branch formatted its error
with `status.code().unwrap()`, but `ExitStatus::code()` is `None` for a
signal-terminated process.
Branch on `status.code()`: keep the existing "exit code: N" message for a
normal non-zero exit, and use a new `install-error-strip-terminated` message
("strip process terminated abnormally") for the signal case — matching GNU,
which reports the same and exits 1. Adds the locale key to en-US and fr-FR and
a regression test.
A database file with a TERM/COLORTERM line whose value is an invalid glob
(e.g. an unclosed `[`) aborted dircolors with a Result::unwrap panic:
`fnmatch` did `parse_glob::from_str(pat).unwrap().matches(self)`, and
from_str returns Err for an unparseable pattern.
Use `is_ok_and`, so an invalid glob is treated as a non-match (and the
unmatched TERM section is skipped) instead of crashing — matching GNU, which
emits an empty LS_COLORS and exits 0.
Set Strength::Quaternary on the ICU collator so that punctuation like
hyphens sort before alphanumerics in UTF-8 locales, matching GNU sort
behavior.
Fixes#12542
* fold: fix crash when reading from pseudo-devices
squashme: wraparound struct for fold
squashme: fix crash when reading from pseudo-devices
Fixes#11291
* tests/fold: add tests to read from pseudo device streams
* tests/fold: kill child process before making asserts
* tests/fold: test fold on pseudo devices only for bsds and linux
Follow-up to the metadata TOCTOU fix (#11972, PR #12439):
- Add a syscall-level regression guard in util/check-safe-traversal.sh:
under strace, head must read metadata from the open descriptor
(fstat/statx on the fd) and must not stat the path before opening it.
Verified this fails on the pre-fix code and passes after.
- Add an integration test asserting that an unreadable file produces an
error but no "==> name <==" header, matching GNU (the header is only
printed after a successful open).
- Fix a stray paren in the Windows-branch comment.
`pr -e0` on input containing a tab aborted with a remainder-by-zero panic
(`chunk.len() % expand_options.width` in `apply_expand_tab`). The
`-e[char][width]` parser accepted a width of `0` — and a negative width via
e.g. `-eX-5` — without validation, so the zero/negative reached the chunk
arithmetic.
Reject `width <= 0` while parsing `-e`, emitting the same invalid-argument
error GNU produces (`pr: '-e' extra characters or invalid number in the
argument: '0'`, exit 1) instead of crashing.