* fix(wc): stop processing after stdout write error
When wc encounters a write error to stdout (e.g., when stdout is redirected to /dev/full), it should stop processing immediately rather than continuing to process remaining files. This matches GNU wc behavior and prevents unnecessary processing after the output is already broken.
* fix(wc): improve error message matching in test_files0_stops_after_stdout_write_error
* wc: fix word undercount with invalid byte sequences
* wc: update utf8 test counts to account invalid byte sequences
* wc: remove unnecessary borrow in test
* wc: align SIMD policy integration
- use SimdPolicy::detect with hardware feature labeling
- keep SIMD behavior respecting GLIBC_TUNABLES
- consolidate wc SIMD debug output and tests
* refactor(wc): simplify SIMD feature collection in debug output
- Changed multi-line SIMD feature vector creation to a single-line expression for improved readability and consistency with surrounding code.
- No functional changes; only stylistic refactoring in the wc debug logic.
* feat(wc): enhance debug output for SIMD hardware support limitations
Add new localization strings and logic to provide detailed debug information when SIMD support is limited by GLIBC_TUNABLES, including lists of disabled and enabled features. Refactor SIMD allowance check for better accuracy in detecting runtime support.
* refactor: consolidate SIMD feature handling in wc command
Refactor SIMD feature detection and reporting in the wc utility by introducing a WcSimdFeatures struct to group enabled, disabled, and runtime-disabled features. This replaces multiple separate functions with a single function, improving code organization and efficiency by reducing redundant iterations over feature lists. Also rename helper functions for clarity and update debug output logic accordingly.
* Update src/uu/wc/src/wc.rs
Co-authored-by: Dorian Péron <72708393+RenjiSann@users.noreply.github.com>
* Update src/uu/wc/locales/en-US.ftl
Co-authored-by: Dorian Péron <72708393+RenjiSann@users.noreply.github.com>
* Update src/uu/wc/locales/fr-FR.ftl
Co-authored-by: Dorian Péron <72708393+RenjiSann@users.noreply.github.com>
* feat(wc): import show_error for enhanced error reporting
Add the show_error import from uucore to enable better error handling in the wc utility, allowing for consistent error messages in line with the project's style.
---------
Co-authored-by: Dorian Péron <72708393+RenjiSann@users.noreply.github.com>
* 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>
* tests: fix execution on WSL2, Ubuntu 24.04
Skip incompatible parts of tests to ensure that
cargo nextest run --features unix
executes successfully in WSL2, Ubuntu 24.04 distribution.
Changes
* Skip tests that required sys/kernel/profiling which is not
available in WSL2 default configuration.
* Use timezones in tests that are part of the standard tzdata
list and not only available in backwards list. Backwards list is
not installed by default in Ubuntu 24.04 (package tzdata-legacy).
* check that /proc/modules is not empty when expecting content,
because it is empty in WSL2 default configuration.
* Skip logname test not only in WSL1, also in WSL2.
* Add workflow for WSL2
This will setup WSL2 on windows-latest runner, install
Ubuntu-24.04, and run the feat_os_unix tests.
* wsl2: implemented review findings
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>