Commit Graph
117 Commits
Author SHA1 Message Date
d2b9550fe8 split: preserve non-UTF-8 bytes in output filename generation (#11397)
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-04-03 12:20:47 +02:00
xtqqczzeandDaniel Hofstetter fb44ce342a chore(deps): update rand and related crates to version 0.10 2026-03-11 11:03:09 +01:00
✿ Fleur de BlueandGitHub 2a2cafdbd4 Re-enable unused_qualifications lint (#10571) 2026-02-03 21:55:21 +01:00
Max AmbaumandGitHub 6ac9543169 split: Added error when attempting to create file that already exists as directory (#9945)
* split: Added error when attempting to create file that already exists as dir

* split: Added integration test test_split::test_split_directory_already_exists

* Fixed dependency error in windows.rs

* Modified test to work on systems without /dev/zero

* Attempt to fix windows error handling

* Removed test for windows and made it more rigorous

* Err made to look more like gnu

* Updated test to reflect change in err message
2026-01-02 13:03:01 +01:00
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 5a6986d55f split: prefix & suffix also support non-utf8 2025-08-14 10:54:04 +02:00
Sylvestre Ledru b91eb4266f Fix split to handle non-UTF-8 filenames 2025-08-14 10:52:24 +02:00
Sylvestre Ledru 1d8dafcea1 fix some last clap errors mgmt 2025-08-14 10:52:03 +02:00
Dorian Peron 6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +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
yuankunzhang d412f582cb split: fix a racing condition that causes issue #7869 2025-05-04 16:49:03 +08: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
Sylvestre Ledru a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Sylvestre Ledru a85539f530 Run cargo fmt on the tree 2025-03-24 21:33:12 +01:00
Sylvestre Ledru 2739c19330 Fix unsafe attribute used without unsafe 2025-03-24 21:00:53 +01:00
Nicolas Boichat b142b9e748 test_*: Disable tests that require setting rlimit on Android
See #7542, it's not totally clear where the problem comes from,
but blanking LD_PRELOAD set by termux seems to fix the problem
(but introduces other issues.

Let's just disable these tests for now.
2025-03-23 20:24:17 +01:00
Sylvestre Ledru 18cb7dcf9e Use the new function fails_with_code
Done with
```
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.no_stdout\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2)\n\1.no_stdout();/gs' *rs
$ sed -i -e "s|.fails()(.*).code_is(|.fails_with_code(|g" *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2);/gs' *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)(.*?)[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\3)\2;/gs' *rs
...
```
2025-03-01 17:26:20 +01:00
Jeffrey Finkelstein 183a99d532 split: avoid extremely long format width in test
Avoid an extremely long format width specifier in test case
`test_long_lines`. The Rust compiler is planning an upcoming change to
restrict the maximum width that can be specified to 65535, so this
change defends against future limitations in the compiler. For more
information, see
<https://github.com/uutils/coreutils/pull/7128#discussion_r1955787665>.
2025-02-14 17:41:36 -05:00
Daniel Hofstetter 410bb30c64 split: adapt tests to API changes of rand 2025-01-30 08:52:42 +01:00
Jeffrey FinkelsteinandSylvestre Ledru 071e72ffc8 split: fix bug with large arguments to -C
Fix the behavior of `split -C` when given large arguments. Before this
commit, bytes were being greedily assigned to a chunk too aggressively,
leading to a situation where a split happened in the middle of a line
even though the entire line could have fit within the next chunk. This
was appearing for large arguments to `-C` and long lines that extended
beyond the size of the read buffer. This commit fixes the behavior.

Fixes #7026
2025-01-13 09:36:48 +01:00
Laurent Cheylus 26da94687f tests: disable failed tests for split on OpenBSD
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-07-06 22:29:18 +02:00
Daniel HofstetterandBen Wiederhake a816960c33 tests: remove 'target_pointer_width = "128"' 2024-05-20 23:27:53 +02:00
Daniel HofstetterandSylvestre Ledru c619dbc99c split: fix error msg shown if file doesn't exist 2024-03-12 14:28:25 +01:00