Teemu Pätsi
4555e6fe48
expr: Handle trailing backslash error
2025-05-24 01:47:30 +03:00
Dorian Péron
cd9ce77098
Merge pull request #7953 from frendsick/fix/expr-regex-anchors
...
expr: Fix parsing regex anchors '^' and '$'
2025-05-23 15:16:28 +02:00
Teemu Pätsi
29332865a9
expr: Handle special cases for $
in regex
...
Enable fixed test `test_bre11`
2025-05-23 15:29:55 +03:00
Teemu Pätsi
f664578a4b
expr: Handle special cases for ^
in regex
2025-05-23 15:23:21 +03:00
Daniel Hofstetter
73e447224c
Adapt to API changes in nix
2025-05-23 09:24:46 +02:00
Sylvestre Ledru
38861cc767
selinux: add support for install
2025-05-21 09:51:27 +02:00
Daniel Hofstetter
147027022a
Merge pull request #7940 from Qelxiros/7671-timeout-tests
...
timeout: add hex parsing test
2025-05-20 10:39:56 +02:00
Sylvestre Ledru
0c7a5d25f2
Merge pull request #7943 from cakebaker/du_fix_never_used_warning_in_test
...
du: fix "function never used" warning in test
2025-05-20 09:44:33 +02:00
Jeremy Smart
384878b5df
add timeout test for hex parsing
2025-05-19 11:18:18 +02:00
Daniel Hofstetter
7f70bfad30
du: fix "function never used" warning in test
2025-05-19 11:18:02 +02:00
Ben Wiederhake
5a8fad8443
shred: implement and test feature --random-source
2025-05-19 11:17:55 +02:00
Ben Wiederhake
0011b6e3f7
run cargo fmt on missed files
...
It seems these files were missed by CI. Command to run cargo fmt on
absolutely *everything* (and possibly too much)
find tests -name "*.rs" -print0 | xargs -0 cargo fmt --
2025-05-19 11:17:46 +02:00
Daniel Hofstetter
8674e86703
cp: fix warnings from unnecessary_debug_formatting
...
Co-authored-by: Jeremy Smart <jeremy3141592@gmail.com>
2025-05-19 09:54:37 +02:00
Aaron Ang
c8c4f525a2
test_more: use at_and_ucmd
helper macro
2025-05-18 21:09:48 +02:00
Daniel Hofstetter
0c53409857
split: delegate to avoid code duplication in test
2025-05-12 10:55:50 +02:00
Daniel Hofstetter
ad9a87118c
split: merge imports in test
2025-05-12 10:52:13 +02:00
Jeremy Smart
c1d2362f1d
fix windows test
2025-05-11 20:18:13 -04:00
Jeremy Smart
67acfbcbf3
hashsum: don't exit early on io errors
2025-05-11 19:10:08 -04:00
Sylvestre Ledru
6091d0b62b
selinux: use the uucore::selinux::is_selinux_enabled() function
2025-05-11 09:36:15 +02:00
Sylvestre Ledru
45b0c39ed7
Merge pull request #7892 from cakebaker/uptime_refactor_uumain
...
uptime: refactor `uumain`
2025-05-09 22:11:44 +02:00
Daniel Hofstetter
7c865b29a1
Merge pull request #7898 from sylvestre/selinux-err
...
selinux: get closer to the GNU error msgs
2025-05-09 13:35:29 +02:00
Jeremy Smart
a752f73476
csplit: don't add a newline if the file doesn't end with one ( #7901 )
...
* csplit: don't add a newline if the file doesn't end with one
* refactor test
* refactor
2025-05-09 09:15:54 +02:00
Sylvestre Ledru
832dd495bf
selinux: adjust more error messages
2025-05-07 22:58:46 +02:00
Daniel Hofstetter
bcc02e9cea
Merge pull request #7897 from aaron-ang/ptx-panic
...
ptx: use char count instead of byte index to handle utf-8 characters
2025-05-07 15:52:13 +02:00
Aaron Ang
1cfb19a936
ptx: use char count instead of byte index to handle utf-8 characters
2025-05-06 23:41:02 -07:00
Daniel Hofstetter
b78f78bedf
uptime: use clap to handle too many path args
2025-05-06 16:05:23 +02:00
Sylvestre Ledru
5148ba12d6
set_selinux_security_context: also display the error from the crate
...
+ fix comments from review
2025-05-06 08:52:27 +02:00
Sylvestre Ledru
b3a2b74ca1
cp/selinx: improve the support of --preserve-context and simplify the code.
...
+ Add test for the selinux changes with context SLASHLogin
Improves the coverage of tests/cp/cp-a-selinux.sh
2025-05-06 08:52:27 +02:00
Sylvestre Ledru
e7fdd3dfba
selinux: add support in cp
2025-05-06 08:52:27 +02:00
Alexander
7d5cfbc4b6
Merge pull request #7881 from alexs-sh/7736-control-flow-experiments
...
uucore/echo:handle ControlFlow result
2025-05-05 00:33:51 +02:00
cerdelen
13c0a813eb
Remove clap for echo ( #7603 )
...
* Parsing echo flags manually without clap as clap introduced various problematic interactions with hyphens
* fixed error where multiple flags would parse wrong
* Spelling & formatting fixes
* docu for EchoFlag struct
* more extensive comment/documentation
* revert POSIXLY_CORRECT check to only check if it is set
* Fixed problem of overwriting flags. Added test for same issue
* cargo fmt
* cspell
* Update src/uu/echo/src/echo.rs
Enabling POSIXLY_CORRECT flag if value is not UTF-8
Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
---------
Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
2025-05-04 20:13:52 +02:00
hz2
6d29b7b3c1
Tail macos stdin ran from script fix ( #7844 )
...
* fixes #7763
- introduce macOS-specific config guard
- added test for testing tail stdin when redirected (`>`) from file and
when through a pipe (`|`)
* created test to mock behavior in #7763 , with comments
added drop line
* re-enabled test_stdin_redirect_dir_when_target_os_is_macos, and added a check to handle error message
* added location of current directory so test env can find script
* adjusting to try to have FreeBSD find the file in CI test
* putting in /env instead of assuming bash
* removed ignore macro
* added comments explaining the need for specific macOS cases, including reference to rust-lang issue: https://github.com/rust-lang/rust/issues/95239
2025-05-04 18:33:09 +02:00
Teemu Pätsi
4ee53acad0
expr: Fix parsing negated character classes "[^a]" ( #7884 )
...
* expr: Fix regex escape logic
We have to track if the previous character was already escaped to determine
if the '\' character should be interpreted as an escape character.
* expr: Fix parsing caret (^) as character class negation token
* expr: Add tests for parsing carets in regex
* expr: Add missing semicolon
* expr: Simplify boolean assignment
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-05-04 17:35:18 +02:00
Daniel Hofstetter
69d5cf40b1
Merge pull request #7877 from yuankunzhang/main
...
split: fix a racing condition that causes issue #7869
2025-05-04 14:39:09 +02:00
Daniel Hofstetter
8c4d69b2f6
Merge pull request #7845 from sylvestre/selinux-error
...
set_selinux_security_context should return an Error, not String
2025-05-04 12:45:53 +02:00
yuankunzhang
d412f582cb
split: fix a racing condition that causes issue #7869
2025-05-04 16:49:03 +08:00
Daniel Hofstetter
5909315d1c
date: move file header to top; merge imports ( #7857 )
2025-05-04 09:36:21 +02:00
Daniel Hofstetter
cd3c921d1e
cp: copy dir if source path ends with dot ( #7874 )
2025-05-04 09:31:34 +02:00
Sylvestre Ledru
c177362a51
set_selinux_security_context: also display the error from the crate
...
+ fix comments from review
2025-05-03 23:16:43 +02:00
Dorian Péron
f49e120877
Merge pull request #7846 from frendsick/fix/expr-regex-option-singleline
...
expr: Fix regex anchor matching behavior with `REGEX_OPTION_SINGLELINE`
2025-05-02 13:35:10 +02:00
Daniel Hofstetter
ed0492a046
uptime: fix "unused import" warnings with musl
2025-05-02 09:09:57 +02:00
Zhang Wen
68c91c17ba
install: implement the --no-target-directory option ( #7867 )
...
* implement --no-target-directory option
* add test for --no-target-directory
2025-05-02 07:24:16 +02:00
Sylvestre Ledru
595f56a9e7
set_selinux_security_context: match GNU's error
2025-05-01 14:10:13 +02:00
Dorian Péron
279629f67e
Merge pull request #7855 from jtracey/printf-nonzero
...
printf: use non-zero indexes
2025-04-30 16:32:31 +02:00
Leo Emar-Kar
b14388ca41
ls: update chrono crate version and switch to new_lenient
use ( #7858 )
...
* update chrono crate version and switch to new_lenient use
* bring back custom_tz_fmt and update test
* update chrono version in fuzz lock file
* replace boxing with parse_to_owned
2025-04-29 16:29:42 +02:00
Nicolas Boichat
19e08d5c11
test_date: Add test for quarter
...
This was fixed upstream in #7333 , but it's a good idea to have a
test here as well, especially as we're considering switching
datetime library.
2025-04-29 21:35:00 +08:00
Nicolas Boichat
25e4410c3b
date: Properly support %#z, instead of rejecting the format
...
It's easy to just replace %#z with %z as the capitalization makes
no sense anyway.
2025-04-29 21:35:00 +08:00
Justin Tracey
27487be267
printf: use non-zero indexes
2025-04-28 14:06:12 -04:00
Dan Hipschman
e92e419a93
cp: refuse to copy symlink over itself
2025-04-28 09:56:43 +02:00
bitspill
d957e64999
Merge pull request #7492 from bitspill/rm
...
rm: skip prompt when stdin is not interactive; Fix #7326
2025-04-27 23:54:16 +02:00