Commit Graph
4244 Commits
Author SHA1 Message Date
Daniel Hofstetter 68a0369a45 Merge pull request #8669 from bakanovskii/add-pinky-lookup-flag
pinky: add --lookup flag
2025-09-19 16:57:42 +02:00
Alexander Bakanovskii 59bf18fd00 tests/pinky: add --lookup test 2025-09-19 16:21:09 +03:00
naoNao89 1afeb7a6e3 csplit: create final empty file with --suppress-matched to match GNU (fixes #7286)
Problem
- With , uutils csplit failed to create the final empty output file when the last split point consumed the trailing input.
- GNU csplit always creates a final segment after processing patterns; with , that empty final segment is elided.
- This broke the GNU test (tests/csplit/csplit-suppress-matched.pl) and the scenario:

Root cause
- Final-file creation was conditional on there being remaining input after pattern processing. If none remained, no final file was created, contrary to GNU semantics.

Fix (minimal, targeted)
- In , after :
  - If there is remaining input, always create a final split and copy the remainder, then finish.
  - Else, if all patterns were integer-based and  is set, create a final (possibly empty) split and finish;  elides it when  is set.

Tests (Rust integration)
- Added two Rust tests under  to lock down GNU-compatible behavior:
  -  (expects sizes 2,2,2,0 and a final empty )
  -  (final empty file is correctly elided)

Verification
- All  tests pass locally. The originally reported case now matches GNU.

Relation to PR #7806
- #7806 proposes a broader refactor to fix multiple issues, but remains a draft and notes remaining GNU suppress-matched differences.
- This PR provides a small, reviewable fix specifically for #7286, plus precise integration tests to safeguard behavior.

Fixes #7286
2025-09-18 00:29:55 +07:00
Sylvestre Ledru 80327e0dd0 Merge pull request #8602 from cakebaker/touch_simplify_some_tests
touch: simplify some tests by using `new_ucmd!()`
2025-09-15 11:56:32 +02:00
Daniel Hofstetter aa42a02459 Merge pull request #8606 from sylvestre/expr-multibyte
expr: fix some multibyte issues
2025-09-14 15:30:12 +02:00
Sylvestre LedruandDaniel Hofstetter 091db2babc expr: fix some multibyte issues and refactor a bit
Should make tests/expr/expr-multibyte pass

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-09-14 01:12:57 +02:00
yuankunzhang 88a7fa7adf date: use --reference=file to display the file modification time 2025-09-13 22:23:33 +08:00
Alen Antony 83574316e7 od: fix options after filename issue (#8624)
* od: fix options after filename issue

* fix cspell issue
2025-09-12 17:37:13 +02:00
Sylvestre Ledru a7a5126af5 Improve the tests 2025-09-12 14:23:03 +02:00
Sylvestre Ledru 1183529cd2 rm: port to use the safe io functions 2025-09-12 14:22:33 +02:00
Sylvestre Ledru c890a3479a du: port to use the safe io functions 2025-09-12 14:22:33 +02:00
Daniel Hofstetter 9ff8273054 Merge pull request #8589 from yuankunzhang/mv-to-symlink-directory
mv: support moving source to a symlink directory
2025-09-10 16:09:07 +02:00
Daniel Hofstetter 086795d26e touch: simplify some tests by using new_ucmd!() 2025-09-10 11:28:23 +02:00
Daniel Hofstetter 74ee8fb1c1 touch: adapt expected error message in test 2025-09-10 10:20:04 +02:00
yuankunzhang 62ae994b55 mv: support moving source to a symlink directory 2025-09-09 20:06:44 +08:00
Etienne Cordonnier e722250e7d link musl libc statically
In the context of musl, users are typically expecting statically-linked tools,
as this is one of musl's strong suits and one of the biggest reasons to use it
instead of glibc (that is not static-link-friendly for reasons).

- remove the build-flag which was causing musl libc to be linked dynamically
- re-add feat_os_unix_musl which was removed in https://github.com/uutils/coreutils/commit/21d5cef15308c018bcb0b34fcbdff47a24aa9fa6
- exclude stdbuf from feat_os_unix_musl, since libstdbuf.so can't be built with a statically linked musl libc
- add test_musl_no_dynamic_deps so that this does not regress in the future

Fixes https://github.com/uutils/coreutils/issues/8572

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-09-09 12:53:32 +02:00
Daniel Hofstetter 2b78922dfa Merge pull request #8565 from Vesal-J/fix-cp-dot-directory-copy
cp: fix copying current directory (.) to existing directory
2025-09-09 07:46:22 +02:00
Vesal J 671345fb5b cp: enhance tests for current directory attribute preservation
This commit adds tests to verify that file permissions and timestamps are preserved when copying the current directory (.) to a destination. Specific permissions and timestamps are set on the source files, and assertions are made to ensure that these attributes are correctly maintained in the copied files. The tests are conditionally compiled for non-Windows and non-FreeBSD systems.
2025-09-08 20:53:46 +03:30
Daniel Hofstetter 93feaccbcf nl: allow non-UTF8 section delimiter 2025-09-08 11:32:07 +02:00
Vesal J f8923d8b15 cp: fix cargo formatting 2025-09-07 19:16:22 +03:30
Vesal J e41f2118c6 cp: add tests for copying current directory (.) to various destinations
This commit introduces several tests to validate the behavior of copying the current directory (.) to both existing and new directories, including checks for verbose output, attribute preservation, and handling of symlinks. Additionally, a test is added to ensure that copying the current directory to itself is disallowed with an appropriate error message. These tests enhance coverage and ensure compliance with expected functionality.
2025-09-07 03:08:40 +03:30
Sylvestre Ledru 70a7b034f4 Merge pull request #8558 from cakebaker/basenc_allow_non_utf8_filenames
basenc: allow non-UTF8 filenames
2025-09-05 23:14:26 +02:00
Daniel Hofstetter eb6bfce7a9 Merge pull request #8551 from sylvestre/emoji-2
add more emoji tests
2025-09-05 11:28:38 +02:00
Daniel Hofstetter 93706cd68c basenc: allow non-UTF8 filenames 2025-09-05 10:54:51 +02:00
Sylvestre LedruandDaniel Hofstetter 23f3551e1c clap/locale: fix the colors for all programs (Closes: #8501)
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-09-05 08:25:59 +02:00