Commit Graph
5018 Commits
Author SHA1 Message Date
oech3andDaniel Hofstetter c7e2957a0d test_tail.rs: remove unsafe 2026-04-28 08:35:40 +02:00
oech3andGitHub 3f6a73da62 test_ls.rs: remove unsafe (#12044) 2026-04-28 00:10:49 +02:00
oech3andGitHub 670fb243fd test_nice.rs: remove unsafe (#12040) 2026-04-27 22:08:39 +02:00
hayato0909andDaniel Hofstetter 7d3a3475b2 numfmt: fix rounding for small scaled values 2026-04-27 17:29:29 +02:00
Lorenzo RossiandGitHub a8ca919dc4 du: propagate errors from --exclude-from instead of panicking (#11996)
* du: propagate errors from --exclude-from instead of panicking

* du: update test_du with --exclude-from failures

* du: fix expected stderr in exclude-from read-error test
2026-04-27 16:14:26 +02:00
Devel08GitHubpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
5fa0aba94d date: don't ignore width prefix in %N format specifier (#12010)
* do not ignore %N if specified width is smaller than default width

* add test for issue #12001

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* cargo clippy

* truncate instead of popping in a loop

* Update format_modifiers.rs

* skip truncation if width is 0

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-04-27 14:59:09 +02:00
oech3andDaniel Hofstetter e8c6c60190 paste: remove unsafe from test code 2026-04-27 11:34:53 +02:00
oech3andDaniel Hofstetter 0d67e58523 cat: remove unsafe from test code 2026-04-27 11:31:19 +02:00
oech3andDaniel Hofstetter 0ca9039fd7 tee: remove unsafe from test code 2026-04-27 09:16:56 +02:00
6b16cc9688 rm: fix path parsing for dot/dotdot protection (#11005)
Fixes #9749: rm -rf ./ and variants silently delete current directory
contents. The path_is_current_or_parent_directory() function did not
match paths like "./" after clean_trailing_slashes() collapsed them.

Rewrite the function to strip trailing separators, extract the last
component, and check if it is "." or "..".

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: naoNao89 <naoNao89@users.noreply.github.com>
2026-04-26 11:12:21 +02:00
Devel08andGitHub c5bdff1816 numfmt: treat multibyte chars as a single character (#11992)
* treat multibyte chars as a single character

* add test for issue 11937
2026-04-25 18:51:57 +02:00
pocopepeandDaniel Hofstetter e348e13e77 numfmt: cap IEC precision at 3 decimals 2026-04-25 16:41:30 +02:00
Devel08andGitHub d836730024 numfmt: respect --invalid mode when rejecting scientific notation (#11945)
* fix #11935

* code style and error message

* cargo fmt

* add test for issue 11935

* Update test_numfmt.rs

* check for the expected output in test
2026-04-23 17:29:40 +02:00
oech3andDaniel Hofstetter 2f49d8eb02 ls: use cfg unix 2026-04-23 10:15:38 +02:00
Daniel HofstetterandGitHub 25a5b3f0b9 join: use show_error instead of eprintln (#11932) 2026-04-23 09:41:19 +02:00
oech3andDaniel Hofstetter 9978ac67f2 date: use cfg unix 2026-04-23 09:02:29 +02:00
vijuandGitHub b3469aeef6 numfmt: honor LC_NUMERIC for decimal separator (#11941)
* numfmt: honor LC_NUMERIC for decimal separator

* fixing clippy warning

* fix spell-checker and skip locale tests on WASI
2026-04-22 15:53:07 +02:00
Sylvestre LedruandGitHub fd781df60a ls: restore WASI ".." metadata fallback in collect_directory_entries (#11930)
* ls: restore WASI ".." metadata fallback in collect_directory_entries

The ls refactor in #9851 dropped the WASI guard added in #11633, so
`ls -al` at a preopened root once again fails with "Capabilities
insufficient" when stat'ing "..". Extract the logic into a small
`dotdot_path` helper and add a regression test covering `ls -al`.

* Update spell-checker ignore words in test_ls.rs
2026-04-22 14:07:02 +02:00
Sylvestre LedruandDaniel Hofstetter 8cc048b43c stty: add support for tabs/-tabs combination settings 2026-04-21 17:02:29 +02:00
0366d3c657 cksum: fix parsing error with tagged cheksum files (#11704)
* cksum: fix parsing error with tagged cheksum files

When passed the '-c'/'--check' flag, and parsing a checksum file in
the "tagged" format, cksum (symlinked to sha256sum, etc...) expects a
line that looks like this:

ShA256 (file.bin) = da39a3ee5e6b4b0d3255bfef95601890afd80709

If the hash algorithm at the beginning of the line (in the above case
SHA256) is missing, then cksum panics because it is attempts to use the
value of an array at index -1. This fix causes cksum to instead consider
the line a syntax error and ignore it, just as GNU cksum does. I also
added unit and integration tests to check for the above behaviour.

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-04-20 23:51:01 +02:00
can1357andSylvestre Ledru 98f6b0187b tr: fix test to assert rejection of -ct with complemented class 2026-04-20 23:28:28 +02:00
can1357andSylvestre Ledru 85af4e8159 tr: fix complemented class truncation ordering 2026-04-20 23:28:28 +02:00
Ibrahim Burak YorulmazandSylvestre Ledru e5a6b519ad tests/dd: test supplying non-positive bs/ibs/cbs/obs 2026-04-20 23:12:56 +02:00
oech3andSylvestre Ledru 36265cb9ee coreutils: --help args is same with --help 2026-04-20 23:05:29 +02:00
Devel08andGitHub e4987f0dbd pr: exit with code 1 if --column argument is zero (#11750) 2026-04-20 22:41:53 +02:00