Nicolas Boichat
fce9f79618
tests: printf: Add more cases around 0, missing digits, etc.
2025-04-15 20:59:35 +02:00
Sylvestre Ledru
a37c4a6dc6
Merge pull request #7756 from uutils/sylvestre-patch-5
...
tail: Ignore a few tests on selinux
2025-04-15 15:21:50 +02:00
Etienne Cordonnier
0354f1f84d
disable failing uptime test for musl
...
musl libc only provides stub functions for utmpx, thus this test cannot pass with musl libc.
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-04-15 12:51:55 +02:00
Dorian Péron
3dcee17572
Merge pull request #7675 from Qelxiros/7669-sleep-hex-parsing
...
fix(sleep): use uucore's from_str to support parsing hex
2025-04-15 00:50:15 +02:00
Jeremy Smart
7f2fb0483a
update tests
2025-04-14 07:34:41 -04:00
Dan Hipschman
d37f500bd3
cp: cp -P hardlink-to-symlink hardlink-to-same-symlink should noop
2025-04-14 13:06:53 +02:00
Sylvestre Ledru
a289e9f0fb
fix declaration
2025-04-14 10:29:11 +02:00
Sylvestre Ledru
bbbc7b5147
Remove extra space
2025-04-14 10:25:30 +02:00
Sylvestre Ledru
7d86f0b5f2
tail: test_follow_name_truncate4 is also flaky on selinux
2025-04-14 10:04:14 +02:00
Sylvestre Ledru
554c0ad593
tail: Ignore a test on selinux
...
test_follow_when_files_are_pointing_to_same_relative_file_and_file_stays_same_size is flaky
2025-04-14 09:46:05 +02:00
Himadri Bhattacharjee
131ee87781
Merge pull request #7755 from lavafroth/date-test-abs-diff
...
refactor(tests): use absolute difference of dates to check if they are within a window
2025-04-14 09:43:14 +02:00
Dorian Péron
c35d26dc51
Merge pull request #7693 from sargas/escape_empty_string
...
uucore/quoting_style: Add support for quoting/escaping empty strings
2025-04-13 23:05:28 +02:00
Sylvestre Ledru
4c796caba5
Merge pull request #7721 from Qelxiros/7166-head-maxint
...
head: fix overflow errors
2025-04-13 16:37:13 +02:00
Daniel Hofstetter
80b6a2155c
Merge pull request #7635 from sylvestre/temp-selinux-impl
...
mkdir: add the selinux support
2025-04-13 14:49:52 +02:00
Joseph Jon Booker
9f1e7a2075
printf: Add integration test for %q ''
2025-04-12 21:44:06 -05:00
Ben Wiederhake
11cd0b1bbf
replace Error::new(ErrorKind::Other, _) as suggested by clippy
...
See also:
https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
2025-04-13 04:35:38 +02:00
Jeremy Smart
cc1112660a
head: return to parse::<usize> and switch to parse_size_u64_max
2025-04-12 23:38:32 +02:00
Ben Wiederhake
a82dce0bd7
du: don't panic on block-size 0
2025-04-12 22:51:09 +02:00
Joseph Jon Booker
7df22051ea
printf: Ignore thousand seperator flag
2025-04-11 23:17:50 -05:00
Joseph Jon Booker
ef7a8c300e
printf: add error handling to escaped unicode characters
2025-04-11 23:17:50 -05:00
Sylvestre Ledru
81c02b7408
mkdir: add support of -Z
...
Should fix: gnu/tests/mkdir/selinux.sh
tests/mkdir/restorecon.sh
2025-04-10 18:26:41 -04:00
Yuri Astrakhan
895b208391
Consolidate crate config in workspace
...
Make all common data like version, edition, license, ... be managed in one central workspace. This makes management much simpler
2025-04-10 16:52:01 -04:00
hz2
cd2b56ea9c
cp: fix update prompting ( #7668 )
...
* added logic to check if we are updating the file and the destination is newer, to skip copying
* corrected logic to handle cp update
* - added test case that mocks the issue described in #7660
- adjusted conditions to satisfy clippy
* typo
* Update src/uu/cp/src/cp.rs
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* Update tests/by-util/test_cp.rs
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-04-10 19:00:39 +02:00
Sylvestre Ledru
45c978fae6
Merge pull request #7686 from dan-hipschman/numfmt/add-zero-terminated-option
...
numfmt: add --zero-terminated option
2025-04-10 07:14:35 -04:00
Sylvestre Ledru
a89fc48388
Merge pull request #7656 from eduardorittner/main
...
printf: make negative values wrap around with unsigned/hex format
2025-04-10 06:48:50 -04:00
Yuri Astrakhan
d77470be2d
fix clippy issues
2025-04-08 18:25:29 -04:00
Yuri Astrakhan
170831ed2b
chore: remove unneeded parens
...
Keeps code a bit more readable
2025-04-08 18:19:03 -04:00
Sylvestre Ledru
0a99ab86e9
Merge pull request #7698 from nyurik/assert-eq
...
chore: use `assert_eq!` and `assert_ne!` instead of `assert!`
2025-04-08 17:00:58 -04:00
Terts Diepraam
8040305715
Merge pull request #7622 from blyxxyz/flush-bufwriters
...
Flush `BufWriter`s, clean up error reporting
2025-04-08 20:52:51 +02:00
Yuri Astrakhan
a27880e8a3
chore: use assert_eq!
and assert_ne!
instead of assert!
...
Makes intent clearer, and if something fails, prints the values that caused the failure as part of the panic message.
2025-04-08 13:25:41 -04:00
Dan Hipschman
81911f9f6a
numfmt: add --zero-terminated option
2025-04-08 10:05:26 -07:00
Daniel Hofstetter
a77e218a79
Merge pull request #7690 from nyurik/manual-inline
...
chore: manual inline formatting - tests
2025-04-08 15:27:14 +02:00
Daniel Hofstetter
7f8ad6a32c
Merge pull request #7688 from nyurik/fmt-inline
...
chore: use inline formatting
2025-04-08 09:31:17 +02:00
Yuri Astrakhan
3dc771924c
chore: cleanup trailing commas before parens
...
Deleted commas in cases like `foo,)` -- mostly in macros
2025-04-08 00:33:58 -04:00
Yuri Astrakhan
982805d3cd
chore: manual inline formatting
...
Minor manual cleanup - inlined many format args. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. Note that `&foo` in a `format!` parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).
2025-04-08 00:23:21 -04:00
Yuri Astrakhan
47b10539d0
chore: use inline formatting
...
Minor cleanup using clippy autofix. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs.
```
cargo clippy --fix --workspace -- -A clippy::all -W clippy::uninlined_format_args && cargo fmt
```
2025-04-07 22:56:21 -04:00
Clifford Ressel
b7bf8c9467
chmod: Correct chmod -R on dangling symlink and tests ( #7618 )
...
* Correct chmod -R on dangling symlink and tests
* Add tests of arg-level symlink to chmod
* Add tests of all symlink flag combos on chmod dangling
* Fix no traverse on dangling symlink
* Add chmod recursive tests of default symlink method
* Add default chmod -H flag tests
* Set chmod default traversal method correctly to -H
* Fix arg symlink chmod case
* Remove extra chmod -H testing
---------
Co-authored-by: Clifford Ressel <EMAIL@gmail.com>
2025-04-07 16:18:00 +02:00
Sylvestre Ledru
0b397c469f
Merge pull request #7401 from RenjiSann/coverage
...
Fix coverage files generation
2025-04-07 11:10:12 +02:00
Dorian Peron
5250b893a7
test(env): fix test_gnu_e20 for coverage run
2025-04-07 10:19:00 +02:00
Dorian Peron
f552a6cb8a
test-utils: make the test harness forward LLVM_PROFILE_FILE to coreutil call
2025-04-07 10:19:00 +02:00
eduardorittner
36ef5010e3
printf: make negative values wrap around with unsigned/hex format
...
To convert from negative to unsigned with overflow, we get the two's complement
representation of the absolute (unsigned) value.
2025-04-06 18:58:56 -03:00
shskwmt
58bde5453d
test/cp: Fix "No such file or directory" error in test_acl_preserve
...
Fix a bug in test_acl_preserve that was causing "setfacl: a: No such file or directory"
error messages when running with `cargo test --features=cp test_acl_preserve`.
Changes:
- Use plus_as_string on path1 to generate the correct absolute path
- Move the file path generation closer to where it's used for better code organization
2025-04-06 23:50:14 +09:00
Joseph Jon Booker
6061b67601
printf: add tests for different octal lengths
2025-04-05 02:02:33 -05:00
Joseph Jon Booker
95e5396c4c
printf: Consistently handle negative widths/precision
...
Also allows character constants with " instead of ', and for
interpolated values with %b to use \0XXX notation for octal bytes
2025-04-05 02:02:31 -05:00
Sylvestre Ledru
88cf66174f
Merge pull request #7648 from drinkcat/parse_time-ebd
...
timeout: Use common parser to parse time duration
2025-04-04 23:46:48 +02:00
Sylvestre Ledru
295628a2e9
Merge pull request #7631 from drinkcat/format-hex-default
...
uucore: format: Fix hexadecimal default format print
2025-04-04 23:44:35 +02:00
Nicolas Boichat
edc213d2c7
test_timeout: Add tests for very short timeouts
...
Note that unlike GNU coreutils, any value > 0 will not be treated
as 0, even if the exponent is very large.
2025-04-04 18:23:17 +02:00
Nicolas Boichat
e0a6482759
seq: Trim whitespaces, then try to remove +
...
Otherwise, `seq` crashes with ` 0xee.` as input.
Also update one of the tests to catch that.
2025-04-04 17:09:33 +02:00
Nicolas Boichat
ae3756b434
seq: Do not allow -w and -f to be specified at the same time
...
Fixes #7466 .
2025-04-04 10:17:17 +02:00
Nicolas Boichat
84e5ee4b86
seq: Accept underflow in parameters
...
Also, add a test to check that a very, very, small number is
treated as 0. That's probably undefined behaviour, but it does
make some sense.
2025-04-03 17:26:38 +02:00