Commit graph

4220 commits

Author SHA1 Message Date
Daniel Hofstetter
93706cd68c basenc: allow non-UTF8 filenames 2025-09-05 10:54:51 +02:00
Sylvestre Ledru
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
Sylvestre Ledru
59b95298f7
Merge pull request #8544 from cakebaker/nl_non_utf8_file_content
Some checks are pending
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Build (push) Blocked by required conditions
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Code Quality / Style/spelling (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
nl: support files with non-utf8 content
2025-09-03 22:41:01 +02:00
Simon Chopin
421d8b7c22 date: add hidden aliases --rfc-2822/822 for GNU compat
In GNU date, those two long options are undocumented aliases for the email format:

❯ date -R
Wed, 03 Sep 2025 17:55:15 +0200

❯ date --rfc-822
Wed, 03 Sep 2025 17:55:22 +0200

❯ date --rfc-2822
Wed, 03 Sep 2025 17:55:27 +0200

Initially noticed as the 2822 option is used in the glibc packaging in Debian and Ubuntu.

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
2025-09-03 17:59:42 +02:00
Sylvestre Ledru
5d9afe8bc7
add tests with emoji for various commands (#8545)
Some checks are pending
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* add tests with emoji for various commands

* test/ls: use touch instead of an empty write

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-09-03 09:57:04 +02:00
Daniel Hofstetter
74028cecba nl: support files with non-utf8 content 2025-09-02 17:36:39 +02:00
Alen Antony
2c9a27c2de
Merge pull request #8492 from Anonymous-AAA/fix-chown-reference-file
Some checks are pending
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Style/deps (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
chown: fix --reference file syntax
2025-09-02 12:30:12 +02:00
Sylvestre Ledru
a81cf2b364
Merge pull request #8540 from cakebaker/nl_join_blank_lines_allow_zero
Some checks are pending
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
Android / Test builds (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
nl: allow zero for `--join-blank-lines`
2025-09-01 18:24:17 +02:00
yuankunzhang
4b36064303 who: honor locale settings 2025-09-01 22:36:54 +08:00
Daniel Hofstetter
787edb4216 nl: allow zero for --join-blank-lines 2025-09-01 11:19:56 +02:00
Daniel Hofstetter
e6276c6e42
Merge pull request #8528 from id3v1669/main
Some checks failed
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Has been cancelled
L10n (Localization) / L10n/Fluent Syntax Check (push) Has been cancelled
L10n (Localization) / L10n/Clap Error Localization Test (push) Has been cancelled
L10n (Localization) / L10n/French Integration Test (push) Has been cancelled
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Has been cancelled
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Has been cancelled
L10n (Localization) / L10n/Locale Support Verification (push) Has been cancelled
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Has been cancelled
mv: treat symlinks as files
2025-08-30 15:07:41 +02:00
id3v1669
c53b5dbce5 mv: symlinks as files, tests 2025-08-30 15:59:24 +08:00
Sylvestre Ledru
218baa3f88 chmod: make a test environment-agnostic
run ssh, it might break with:

---- test_chmod::test_chmod_umask_expected stdout ----

thread 'test_chmod::test_chmod_umask_expected' panicked at tests/by-util/test_chmod.rs:240:5:
assertion `left == right` failed: Unexpected umask value: expected 022 (octal), but got 002. Please adjust the test environment.
  left: 2
 right: 18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2025-08-29 22:53:09 +02:00
Daniel Hofstetter
fddfa1e763 factor: fix two "unused import" warnings in test 2025-08-28 10:15:53 +02:00
Sylvestre Ledru
2d0985d7fa du: add a test to cover a part of tests/du/threshold 2025-08-27 21:35:19 +02:00
Daniel Hofstetter
7a9f88a783 nl: rename test function 2025-08-24 17:35:34 +02:00
Daniel Hofstetter
91cf001180 nl: use OsString for --number-separator 2025-08-24 17:35:34 +02:00
Sylvestre Ledru
06b14c027c
Merge pull request #8486 from martinkunkel2/devcontainer
Some checks failed
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
L10n (Localization) / L10n/Clap Error Localization Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
CheckScripts / ShellScript/Format (push) Has been cancelled
CheckScripts / ShellScript/Check (push) Has been cancelled
Add devcontainer setup and small related fixes
2025-08-23 11:55:47 +02:00
Daniel Hofstetter
703084ee5e date: allow multiple -d, last wins 2025-08-22 10:16:17 +02:00
Daniel Hofstetter
e01c414f97 rm: remove duplicate test
and adapt remaining test for wasi
2025-08-18 13:40:10 +02:00
Martin Kunkel
e41c1405c9 Add devcontainer setup and small related fixes
- Added devcontainer configuration based on Ubuntu 24.04
- Added GitHub Actions workflow for devcontainer testing
- Update cSpell configuration to ingore spelling in devcontainer configs
- Update pre-commit hooks to exclude cSpell.json because pre-commit
  fails for that file due to json with comments format
- Fix filename for cSpell config in vscode settings
- Two tests in `test_dd.rs` are now skipped if /dev/sda1 is not
  available, which is the case in devcontainer
- Update check for existing gnu clone in build-gnu.sh, not checking the
  existence of the directory but the presence of the .git directory.
  This allows us to have the directly as a volume mount in devcontainer
- Remove temporary file `g` after use in build-gnu.sh
2025-08-18 07:34:16 +00:00
Daniel Hofstetter
1004ba7f63 users: fix unused imports in tests on FreeBSD 2025-08-16 16:57:43 +02:00
Daniel Hofstetter
9e50f7f5c6
Merge pull request #8478 from Anonymous-AAA/fix-cp-socket-file-unix
Some checks are pending
CICD / Build/stable (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/Clap Error Localization Test (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
cp: fix recursive socket file copy
2025-08-15 11:19:22 +02:00
Daniel Hofstetter
59815b3e97
Merge pull request #8482 from sylvestre/l10n-2
Some checks are pending
Code Quality / Style/lint (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/Clap Error Localization Test (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
sort: adjust the behavior of 'sort --output --file-with-dash' to match GNU's
2025-08-15 09:44:32 +02:00
Sylvestre Ledru
d9f17ccb02 sort: adjust the behavior of 'sort --output --file-with-dash' to match GNU's 2025-08-14 20:55:20 +02:00
Alen Antony
09b5b0daaa
Merge branch 'main' into fix-cp-socket-file-unix 2025-08-14 18:39:45 +05:30
Sylvestre Ledru
0532ea4727 split: adjust the test for windows 2025-08-14 14:18:15 +02:00
Sylvestre Ledru
0a7ea78733 split: bring back the test 2025-08-14 10:54:17 +02:00
Sylvestre Ledru
1c5b95d1bb non-utf8: address review commits 2025-08-14 10:54:17 +02:00
Sylvestre Ledru
5930ba0eb5 head: refactor the code a bit 2025-08-14 10:54:17 +02:00
Sylvestre Ledru
83e5be8a52 install: options support non-ut8 too 2025-08-14 10:54:17 +02:00
Sylvestre Ledru
66a1fc8bbf mktemp: options support non-ut8 too 2025-08-14 10:54:17 +02:00
Sylvestre Ledru
71b4de24e6 test: improve support non-utf-8 2025-08-14 10:54:04 +02:00
Sylvestre Ledru
5a6986d55f split: prefix & suffix also support non-utf8 2025-08-14 10:54:04 +02:00
Sylvestre Ledru
39fbdeecb2 tac/touch: fix support non-utf-8 2025-08-14 10:53:55 +02:00
Sylvestre Ledru
5ae195b99a Update tests/by-util/test_pathchk.rs
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-08-14 10:52:37 +02:00
Sylvestre Ledru
a7f3cb0209 realpath: fix regression with empty string validation
Fixes issue introduced in b965c944837df66b233f57fca7275fbed4e4d311 where
switching from NonEmptyStringValueParser to OsString parser removed
validation that arguments cannot be empty strings.

- Add custom NonEmptyOsStringParser that validates OsString is not empty
- Use the parser for FILES, --relative-to, and --relative-base arguments
- Add test case to verify empty strings are rejected with exit code 1
- Fixes GNU realpath test failure
2025-08-14 10:52:37 +02:00
Sylvestre Ledru
741370d771 Fix tac to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
ba7d902e50 Fix tsort to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
596784e70e Fix base64/base32/basenc to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
a69e6c9bd3 Fix dircolors to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
b46188cdb2 Fix nl to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
b5f8931b17 Fix stdbuf to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
f02436be0f Fix expand to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
8b38336036 Fix pathchk to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
d45113f574 Fix paste to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
581edf09d3 Fix chgrp to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
b91eb4266f Fix split to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
89f434d2bc Fix fmt to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru
20793600f7 Fix csplit to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00