Commit graph

5767 commits

Author SHA1 Message Date
Michael Debertol
5f2335829a refactor ~ revert to single quotes for "Try '{0 --help'"
This is a test expectation for gnu.
2021-08-14 17:22:09 +02:00
Michael Debertol
6ab3d27c4e fix ~ remove redundant clone()
util_name!() and execution_phrare!() now return a String directly
2021-08-14 14:48:38 +02:00
Michael Debertol
3039083521 refactor/uucore ~ mark executable!() as deprecated
Make sure that utilities do not use it anymore.
It is only allowed as  an implementation detail of util_name!() and execution_phrase!()
2021-08-14 14:19:05 +02:00
Michael Debertol
813b477859 fix ~ fixes for newly added utilities 2021-08-14 14:10:35 +02:00
Michael Debertol
44981cab01 refactor/uucore ~ correct implementation of executable!() for multicall
- Use an atomic bool to track whether the utility name is the second
or the first argument.
- Add tests
2021-08-14 14:01:34 +02:00
Roy Ivy III
38f3d13f7f maint/CICD ~ pin code coverage utility grcov at v0.8.0 (v0.8.1 uses unstable take()) 2021-08-14 14:01:34 +02:00
Roy Ivy III
4da46d93c7 tests ~ fix tests for new execution_phrase!() and usage phrasing 2021-08-14 14:01:34 +02:00
Roy Ivy III
c0854000d1 refactor ~ use execution_phrase!() for usage messaging 2021-08-14 14:01:33 +02:00
Roy Ivy III
318f366ace change/uucore ~ add execution_phrase!() macro for use with usage messages 2021-08-14 13:58:45 +02:00
Roy Ivy III
f56fc5bf44 refactor/uucore ~ use uucore args for executable macros 2021-08-14 13:58:45 +02:00
Roy Ivy III
69ce4dc8e5 refactor/uucore ~ align return values for executable/util macros 2021-08-14 13:58:45 +02:00
Roy Ivy III
eb13533e4e refactor/uucore ~ replace executable_name!() with util_name!() in standard messaging 2021-08-14 13:58:45 +02:00
Roy Ivy III
23b68d80ba refactor ~ usage() instead of get_usage() 2021-08-14 13:58:43 +02:00
Roy Ivy III
894d9a068c refactor ~ standardize on 'Try {} --help...' messaging (common markdown-type formatting) 2021-08-14 13:55:11 +02:00
Roy Ivy III
c5792c2a0f refactor ~ use util_name!() as clap::app::App name argument for all utils 2021-08-14 13:53:13 +02:00
Roy Ivy III
fa5dc90789 refactor/uucore ~ improve macro scope hygiene 2021-08-14 13:51:36 +02:00
Roy Ivy III
ed240a7e50 fix/uucore ~ revise and fix msg macros and sub-macros 2021-08-14 13:51:36 +02:00
Roy Ivy III
065330c4ca refactor/uucore ~ improve crash!() (DRY use of exit!()) 2021-08-14 13:51:36 +02:00
Roy Ivy III
27c4530f3c refactor/uucore ~ reorganize macros into sections by 'type' 2021-08-14 13:51:36 +02:00
Roy Ivy III
be8f073217 refactor/uucore ~ add OsString support for executable!() 2021-08-14 13:51:36 +02:00
Michael Debertol
6f58da00dd refactor/uucore ~ add util_name!(); correct implementation of executable!() 2021-08-14 13:51:36 +02:00
Terts Diepraam
f9559fea80
Merge pull request #2569 from jtracey/master
join: add support for full outer joins
2021-08-13 14:38:15 +02:00
Sylvestre Ledru
db7773eddc
Merge pull request #2557 from miDeb/chgrp/no-err
chgrp: don't output an empty error
2021-08-13 09:02:54 +02:00
Justin Tracey
1bb0237281 join: add support for full outer joins 2021-08-12 23:52:35 -04:00
Sylvestre Ledru
a7797c01c0
Merge branch 'master' into chgrp/no-err 2021-08-13 01:35:21 +02:00
Sylvestre Ledru
01be7b356f
Merge pull request #2558 from fdanis-oss/fix-csplit-split_name
csplit: fix suffix support without flag
2021-08-13 01:34:30 +02:00
Sylvestre Ledru
ea5097e4a0
Merge pull request #2562 from tertsdiepraam/uucore/simpler-uerror
`uucore`: simpler `UResult` and `UError`
2021-08-13 01:33:23 +02:00
Sylvestre Ledru
5a0032c56e
Merge pull request #2563 from koutheir/master
chcon: reduce the number of unsafe blocks.
2021-08-13 01:32:42 +02:00
Sylvestre Ledru
8f55c79c9b
Merge pull request #2566 from miDeb/ls/width
ls: correct output width
2021-08-13 01:31:52 +02:00
Sylvestre Ledru
f98415051b
Merge pull request #2567 from miDeb/pr/tests
pr: reduce test flakiness
2021-08-13 01:30:19 +02:00
Sylvestre Ledru
b9f79e1379
Merge pull request #2568 from miDeb/cp/tests
cp: do not set the current directory in tests
2021-08-13 01:28:55 +02:00
Michael Debertol
ce1323ce1c cp: do not set the current directory in tests
Setting the current directory in tests affects other tests, even if the
change is reverted after, because tests are run in parallel.

This should fix the flaky cp tests.
2021-08-12 22:42:40 +02:00
Michael Debertol
1725bf6a36 pr: reduce test flakiness
Since some tests run multiple commands, we have to re-calculate the
expected result for every run.
This is because the expected results depend on file timestamps, but the
files are re-created for every new TestScenario.
2021-08-12 17:03:06 +02:00
Michael Debertol
21043d3605 sort: prevent race when deleting files
Move the creation of temporary files into next_file so that it happens
while the lock is taken.

Previously, only the computation of the new file path happened while
the lock was taken, while the creation happened later.
2021-08-12 13:50:56 +02:00
Terts Diepraam
3a6769f74b
Merge pull request #2564 from miDeb/chgrp/empty-group
chgrp: handle empty group
2021-08-12 10:47:56 +02:00
Frédéric Danis
6283dbe451 csplit: fix suffix support without flag
csplit fails when suffix has no flags:
$ csplit result.expected -f /tmp/EXPECT -b "%d" "/^## alternative ##$/" {*}
csplit: error: incorrect conversion specification in suffix

This is supported by original csplit
2021-08-12 10:27:56 +02:00
Michael Debertol
0af244ac42 ls: default to one-line output if stdout is not a tty 2021-08-11 22:03:41 +02:00
Michael Debertol
988cc49d4a ls: print a single line when width is set to 0
This means that we treat a width=0 as infinite width.
2021-08-11 19:12:45 +02:00
Michael Debertol
13a62489c5 ls: correct fallbacks for terminal width
If options::WIDTH is not given, we should try to use the terminal width.
If that is unavailable, we should fall back to the 'COLUMNS' environment variable.
If that is unavailable (or invalid), we should fall back to a default of 80.
2021-08-11 19:12:37 +02:00
Michael Debertol
1c30fb42d2 chgrp: handle empty group 2021-08-11 19:03:41 +02:00
Sylvestre Ledru
13b6d003bb
Merge pull request #2549 from jaggededgedjustice/compare-gnu-test-results
Add step to GnuTest workflow to compare results against master
2021-08-11 10:41:19 +02:00
James Robson
882b5ad1f1 Display changes in the failing GNU tests
Co-authored-by: Michael Debertol <michael.debertol@gmail.com>
2021-08-10 19:29:23 +01:00
James Robson
81a5f0a4dc Add step to GnuTest workflow to compare results against master 2021-08-10 19:29:23 +01:00
Koutheir Attouchi
83a515e4c3 chcon: reduce the number of unsafe blocks. 2021-08-10 13:50:51 -04:00
Terts Diepraam
14459cf611 rustfmt 2021-08-10 19:18:09 +02:00
Terts Diepraam
ea3c15f0dd uucore: use default UError impl for UIoError 2021-08-10 17:55:37 +02:00
Terts Diepraam
d12d4f760c uucore: {USimpleError, UUsageError}::new take Into<String> instead of String 2021-08-10 17:55:37 +02:00
Terts Diepraam
1649217116 uucore: remove distinction between common and custom errors
As custom errors are prefered over wrapping around common errors, the
distinction between UCommonError and UCustomError is removed. This
reduces the number of types and makes the error handling easier to
understand.
2021-08-10 17:55:28 +02:00
Sylvestre Ledru
fe539a6dea
Merge pull request #2559 from miDeb/factor/line-buffered
factor: prevent writing incomplete lines
2021-08-10 15:25:11 +02:00
Sylvestre Ledru
ca0bae0dfd
Merge pull request #2500 from Funky185540/feature/install-use-uresult
install: Use UResult
2021-08-10 13:32:00 +02:00