Jeffrey Finkelstein
0f1053ce68
head: refactor helper func find_nth_line_from_end
...
Factor out a loop for finding the index of the byte immediately
following the `n`th line from the end of a file. This does not change
the behavior of the code, just its organization.
2022-01-17 10:55:40 -05:00
Terts Diepraam
951f3bb689
fix up runcon and chcon for clap 3
2022-01-17 16:52:17 +01:00
Terts Diepraam
55893f0e3d
od: use clap options instead of custom mock options for unit tests
2022-01-17 16:25:49 +01:00
sbentmar
b0cf6f9b34
numfmt: minor adjustments to test cases
2022-01-17 16:24:40 +01:00
sbentmar
635c2d0c31
numfmt: remove unused function
2022-01-17 16:24:40 +01:00
sbentmar
1287ce3780
numfmt: add tests for handle_buffer
2022-01-17 16:24:40 +01:00
sbentmar
413bff26f8
numfmt: ignore stdin write error
2022-01-17 16:24:40 +01:00
sbentmar
4a7d313712
numfmt: add unit test for io error
2022-01-17 16:24:40 +01:00
sbentmar
328cf4d91b
numfmt: add more negative tests
2022-01-17 16:24:40 +01:00
sbentmar
5cab4e41b3
numfmt: add copyright notice
2022-01-17 16:24:40 +01:00
Sebastian Holgersson
9b04c98ddb
numfmt: use UResult in more functions
...
This commit replaces generic Results with UResults in some key
functions in numfmt. As a result of this, we can provide different
exit codes for different errors, which resolves ~70 failing test
cases in the GNU numfmt.pl test suite.
2022-01-17 16:24:40 +01:00
Jeffrey Finkelstein
ab4036297b
head: use uucore error handling instead of custom
...
Use `show!()` and `USimpleError` to handle I/O errors instead of using
custom code.
2022-01-17 08:58:44 -05:00
Jeffrey Finkelstein
58f2000406
split: method to convert ArgMatches to Settings
...
Create a `Settings::from` method that converts a `clap::ArgMatches`
instance into a `Settings` instance. This eliminates the unnecessary
use of a mutable variable when initializing the settings.
2022-01-17 08:58:10 -05:00
Jeffrey Finkelstein
d9afdf0527
uucore: move printf::memo module to uucore
...
Move the `printf::memo` module to `uucore` so that it can be used by
other programs, not just `printf`. For example, the `-f` option to `seq`
requires parsing and formatting numbers according to the same logic as
`printf`.
2022-01-17 08:46:45 -05:00
Jeffrey Finkelstein
2d66c84413
printf: remove cli module
...
Remove the cli module from the printf crate and move its functions into
the module tokenize::unescaped_text module, the only place they are
used.
2022-01-17 08:43:36 -05:00
Terts Diepraam
8872485922
Merge branch 'main' into clap-3
2022-01-17 13:25:51 +01:00
Terts Diepraam
08efa1fe5a
Merge branch 'main' into join-null-field-sep
2022-01-17 12:59:52 +01:00
Sylvestre Ledru
ec386fa460
Merge pull request #2883 from sylvestre/pretty_assertions
...
update pretty_assertions to version 1
2022-01-17 12:58:14 +01:00
Sylvestre Ledru
eec2d79bbd
stbuf: remove the old comment
2022-01-17 12:56:07 +01:00
Sylvestre Ledru
3dfb9a23c0
update pretty_assertions to version 1
2022-01-17 12:55:16 +01:00
Sylvestre Ledru
a87a71893f
Merge pull request #2879 from sylvestre/chrono-issue
...
Force minimal version of chrono to avoid a security issue
2022-01-17 12:53:31 +01:00
Sylvestre Ledru
9c14b943a8
update pretty_assertions to version 1
2022-01-17 08:53:20 +01:00
Sylvestre Ledru
f0095329a7
Merge pull request #2880 from jtracey/join-z
...
join: add support for `-z` option
2022-01-17 08:42:42 +01:00
Justin Tracey
109277d405
join: add support for -t '\0'
2022-01-16 18:05:58 -05:00
Justin Tracey
346415e1d2
join: add support for -z option
2022-01-16 17:56:07 -05:00
Sylvestre Ledru
fcff6fec6d
Force minimal version of chrono to avoid a security issue
...
See: https://rustsec.org/advisories/RUSTSEC-2020-0071.html
2022-01-16 23:33:12 +01:00
Sylvestre Ledru
4fc47aba61
Merge pull request #2878 from tertsdiepraam/stdbuf-trouble
...
`stdbuf`: fix `cargo publish` problem
2022-01-16 23:23:35 +01:00
Sylvestre Ledru
516bdfcfd5
Merge pull request #2872 from jfinkels/split-verbose
...
split: add --verbose option
2022-01-16 23:19:30 +01:00
Sylvestre Ledru
7e9ed4b346
Merge pull request #2869 from tertsdiepraam/rust-1.54
...
Bump MSRV to 1.54.0
2022-01-16 23:18:50 +01:00
Terts Diepraam
c5e2515833
fix stdbuf problem
2022-01-16 22:50:34 +01:00
Sylvestre Ledru
70d8864fe1
Improve the release doc
2022-01-16 19:00:32 +01:00
Sylvestre Ledru
5382307e64
coreutils: use stdbuf 0.0.8 to publish it
2022-01-16 18:57:22 +01:00
electricboogie
16b7b38b92
Run cargo fmt
2022-01-16 11:17:43 -06:00
electricboogie
e6ce049d2c
Fix Windows lints/build errors
2022-01-16 11:07:22 -06:00
electricboogie
e1bffea595
Merge branch 'master' into ls_bad_fd_2
2022-01-16 10:26:44 -06:00
electricboogie
15efba54c5
Use dir_entry metadata for dereferenced bad fds to match GNU, add comments, clippy lints
2022-01-16 10:20:50 -06:00
Sylvestre Ledru
1fbda8003c
coreutils 0.0.8 => 0.0.9, uucore_procs 0.0.7 => 0.0.8, uucore 0.0.10 => 0.0.11
2022-01-16 17:05:48 +01:00
Sylvestre Ledru
3fbe4f92f7
update-version.sh: 0.0.8 => 0.0.9
2022-01-16 17:04:43 +01:00
Sylvestre Ledru
661047623c
update-version.sh: document the release process
2022-01-16 17:04:31 +01:00
Sylvestre Ledru
00c11b184f
Merge pull request #2851 from jtracey/join-strless
...
join: operate on bytes instead of Strings
2022-01-16 16:24:38 +01:00
Terts Diepraam
448b84806f
fix Rust 1.58 clippy lints ( #2874 )
2022-01-16 15:57:33 +01:00
Jeffrey Finkelstein
7af3007204
split: add --verbose option
2022-01-16 09:34:28 -05:00
electricboogie
37ca6edfdc
Fix display of bad fd errors
2022-01-15 22:39:07 -06:00
Terts Diepraam
783170c9d8
change msrv to 1.54
2022-01-15 11:08:07 +01:00
kimono-koans
fd5310411e
ls: Fix device display ( #2855 )
2022-01-15 00:39:56 +01:00
Sylvestre Ledru
3cc1fb593a
Merge pull request #2859 from jfinkels/split-dynamic-suffix-length
...
split: correct filename creation algorithm
2022-01-14 18:06:57 +01:00
Terts Diepraam
fc3c82ffdc
update cargo.lock for clap 3.0
2022-01-11 19:16:48 +01:00
Terts Diepraam
c93298f32c
coreutils: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
49e5412580
tsort: clap 3
2022-01-11 19:16:48 +01:00
Terts Diepraam
e62fdb9307
yes: clap 3
2022-01-11 19:16:48 +01:00