Commit graph

2662 commits

Author SHA1 Message Date
Ben Wiederhake
4fcf912c85 truncate: remove two-year-old file-creation todos
In commit 129cfe12b8
2024-03-23 13:57:15 +01:00
Sylvestre Ledru
88ff42e840
Merge pull request #6102 from Krysztal112233/main
lint: fix lints of new Rust version
2024-03-23 12:21:03 +01:00
Krysztal112233
29d14cba51
lint: fix unused_imports on freebsd target. 2024-03-23 17:23:22 +08:00
Krysztal112233
d21dc125d0
lint: fix clippy::suspicious_open_options of project. 2024-03-23 16:49:35 +08:00
Daniel Hofstetter
5e6fa49ef5 more: fix incorrect tests 2024-03-22 15:13:53 +01:00
Krysztal112233
ef8c379370
lint: fix clippy::redundant_clone of test_dd.rs test_cp.rs 2024-03-22 17:38:54 +08:00
Krysztal112233
fd3640482b
lint: fix clippy::unnecessary_to_owned in test_cksum.rs 2024-03-21 23:56:40 +08:00
Krysztal112233
ee09f276a4
lint: fix clippy::useless_format in test_cksum.rs 2024-03-21 23:55:36 +08:00
Daniel Hofstetter
77a67559eb
Merge pull request #5966 from Ideflop/more-implement-argument-pattern
More implement argument pattern
2024-03-21 10:51:31 +01:00
Ulrich Hornung
89110abe97
test_od - re-enable f16 test with newer AVD system image 2024-03-20 23:33:06 +01:00
Daniel Hofstetter
3ad226cf54 fmt: show error if goal > default width 2024-03-20 10:26:11 +01:00
sreehari prasad
660014e532
dd: misc gnu test (#6084)
* dd: check file is a dir for iflag directory

* Improve english

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

* dd: stderr output checking for "iflag directory" testcase

* dd: replace #[cfg(unix)] with #[test]

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-03-20 06:55:54 +01:00
Sylvestre Ledru
08172c28c0
Merge pull request #5801 from cre4ture/feature/env_string_args_try_with_shell_words
env: support string args by "-S", "-vS" or "--split-strings"
2024-03-19 19:32:04 +01:00
Daniel Hofstetter
7c8dfca4a7
Merge pull request #6094 from sargas/fmt-small-widths
fmt: Make sure goal is always positive
2024-03-19 16:55:10 +01:00
Joseph Jon Booker
f456b9531f fmt: Make sure goal is always positive
A debug assertion was added to enforce "width >= goal" to catch
that case before a panic in linebreak.rs. A few warnings in linebreak.rs
were addressed as well, and some isize's that should always be positive
(if there's no width/goal bugs) were changed to usizes to catch bugs
earlier.

test_fmt_width is updated to test for the same result as GNU fmt
2024-03-19 08:52:04 -05:00
Ulrich Hornung
c62ba559d0 env: support string args by "-S", "-vS" or "--split-strings" 2024-03-19 00:45:05 +01:00
Ben Wiederhake
133cdde885 cksum: implement and test --base64 output method 2024-03-18 20:59:59 +01:00
Ben Wiederhake
7b219aee63 cksum: implement trivial --tag flag 2024-03-18 20:59:59 +01:00
Ben Wiederhake
edb1eb0a76 cksum: allow repeated flags and arguments 2024-03-18 20:59:59 +01:00
Daniel Hofstetter
2f4969c0e9
Merge pull request #6090 from sylvestre/csplit2
csplit: adjust the error message to match GNU's
2024-03-18 09:33:54 +01:00
Sylvestre Ledru
696615099c
Merge pull request #6088 from cre4ture/fix/gnu_test_dd_not_rewound_sh
`dd` fix gnu test `not-rewound.sh`
2024-03-17 23:03:22 +01:00
Ulrich Hornung
40577177b2
re-use existing fd for stdout even if its a seek-able file
this is important as the fd holds the file offset we need to use
2024-03-17 20:46:49 +01:00
Sylvestre Ledru
b49fbd9a21 csplit: run the file check before the arguments verifications 2024-03-17 19:09:34 +01:00
Sylvestre Ledru
8551c55ab3 csplit: adjust the error message to match GNU's
Should fix tests/csplit/csplit
2024-03-16 22:21:44 +01:00
Daniel Hofstetter
6d8b21da80 Fix two "item x is imported redundantly" warnings 2024-03-15 14:53:00 +01:00
Sylvestre Ledru
62a3fb8d3f
Merge pull request #5909 from cakebaker/split_fix_error_message_if_file_doesnt_exist
split: fix error message shown if file doesn't exist
2024-03-13 17:41:56 +01:00
Sylvestre Ledru
f89cfe2a5e
Merge pull request #6061 from cre4ture/fix/flaky_timeout_kill_subprocess
Fix/flaky timeout kill subprocess
2024-03-13 11:13:09 +01:00
Daniel Hofstetter
09adf77503 sort: fix incorrectly placed "}" in test 2024-03-13 07:19:42 +01:00
Ulrich Hornung
7e22f99913
remove second sh process to have timeout waiting for the right process 2024-03-12 19:08:51 +01:00
Ulrich Hornung
a2a375d0dd
using other than TERM/KILL signal to see if --preserve-status works 2024-03-12 19:05:51 +01:00
Sylvestre Ledru
1725479c06
hashsum: also escape/unescape files with checks (#5868)
* hashsum: make tag conflicts with --text and --check

* hashsum: change the case in one of the gnu test

* build-gnu.sh: use symlink instead of copy

Plus: it won't cp new md5

* hashsum: also escape/unescape files with checks

Should fix tests/cksum/md5sum-bsd.sh

* improve the variable name

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

* Improve test

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

* Improve test

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

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-03-12 14:56:27 +01:00
Daniel Hofstetter
c619dbc99c split: fix error msg shown if file doesn't exist 2024-03-12 14:28:25 +01:00
Sylvestre Ledru
ffb70592ec
Merge pull request #5851 from cre4ture/fix/install_invalid_link_at_destination
Fix install: invalid link at destination
2024-03-12 08:02:18 +01:00
Ulrich Hornung
7cd754eb1f
Fix install: invalid link at destination
also remove some FixMEs for FreeBsd
2024-03-11 23:31:26 +01:00
Sylvestre Ledru
89b326fe1e
cp: improve the support of --attributes-only (#6051)
* cp: improve the support of --attributes-only

* remove useless comments

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

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-03-11 08:35:27 +01:00
Sylvestre Ledru
80702d5391
Merge pull request #6014 from BenWiederhake/dev-shuf-range-off-by-one
shuf: Fix off-by-one errors in range handling
2024-03-10 22:44:12 +01:00
Sylvestre Ledru
2e8f0e501c
Merge pull request #6039 from BenWiederhake/dev-chcon-repeat-args
chcon: Handle repeated flags and overrides between --no-XXX and --XXX
2024-03-10 22:36:57 +01:00
Yury Zhytkou
156d3f7ee7
cut: allow non utf8 characters for delimiters (#6037) 2024-03-10 22:36:17 +01:00
Ideflop
a227af70bc test/more: test argument --pattern 2024-03-10 22:14:26 +01:00
Daniel Hofstetter
0579233b2d chgrp: fix clippy warning 2024-03-10 13:56:31 +01:00
Daniel Hofstetter
9054a24fb7 pr: fix deprecation warnings & remove comment 2024-03-10 13:55:49 +01:00
Daniel Hofstetter
1eaa87cd62
Merge pull request #6052 from sylvestre/clippy43
Fix clippy warnings
2024-03-10 13:31:08 +01:00
Terts Diepraam
a578fe9e55
Merge pull request #6050 from matrixhead/main
dd : treat arg as bytes if it contains a 'B'
2024-03-10 12:52:29 +01:00
Yash Thakur
d11d595fda
touch: Respect -h when getting metadata (#5951)
* Add tests that stat symlinks

* Check follow first in stat

* Don't run tests on FreeBSD

It would be possible to get them to run on FreeBSD by avoiding
get_symlink_times, but the behavior we're testing is not
platform-specific, so it's fine to not test it on FreeBSD.

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-03-10 08:05:59 +01:00
Sylvestre Ledru
8c7940260b
Merge pull request #6047 from cakebaker/bump_chrono
Bump chrono to 0.4.35 & replace usage of deprecated functions
2024-03-10 07:51:50 +01:00
Ben Wiederhake
8be5f7a89d chcon: allow repeated flags and arguments 2024-03-09 22:52:55 +01:00
Ben Wiederhake
dbfd4d80ee chcon: allow overriding between --dereference and --no-dereference 2024-03-09 22:52:55 +01:00
Ben Wiederhake
b233569b9c shuf: fix error message text on negative-sized ranges
Found by @cakebaker:
https://github.com/uutils/coreutils/pull/6011#discussion_r1501838317
2024-03-09 22:51:13 +01:00
Ben Wiederhake
4ee3f68e6a shuf: fix and test off-by-one errors around ranges 2024-03-09 22:51:13 +01:00
Sylvestre Ledru
dcfb03aad6 Fix clippy warnings 2024-03-09 22:31:33 +01:00