Commit graph

609 commits

Author SHA1 Message Date
Michael Debertol
816c55dce4 sort: avoid sigpipe errors
By calling `unwrap` we get a panic instead of an abort, and since we
mute sigpipe panics for all utilites, no error message will be printed.
2021-06-17 00:06:39 +02:00
Terts Diepraam
ce6d439a1b
Merge pull request #2381 from miDeb/sort/merge-improvements
sort: delete temporary files as soon as possible
2021-06-17 00:00:59 +02:00
Michael Debertol
4c5ee1dbd7 tty: correct exit code for write errrors 2021-06-16 17:55:48 +02:00
Michael Debertol
aeaf2cebfb tests/tty: fix test inputs
calling `pipe_in("</dev/null")` does not pipe in the `/dev/null` file,
but the raw string "</dev/null".

Closes https://github.com/uutils/coreutils/issues/2301
2021-06-16 17:43:49 +02:00
Hanif Bin Ariffin
23de181171 Added tests for cp --preserve without args
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-06-16 11:32:15 +08:00
Michael Debertol
d4914b6943 sort: add a test for --batch-size 2021-06-15 19:09:22 +02:00
Daniel Rocco
22fbf16b2c test: implement user, group ownership checks
closes #2337
2021-06-14 14:30:17 -04:00
Terts Diepraam
553f70b06a
Merge pull request #2408 from Foryah/issue-2346
touch: change the error message to match the GNU error message #2346
2021-06-14 13:43:44 +02:00
David Suilea
25240ba61c
touch: change the error message to match the GNU error message #2346 2021-06-14 13:03:14 +02:00
Terts Diepraam
dfe0314d8d
Merge pull request #2397 from miDeb/sort/args
sort: refactor command line arguments
2021-06-14 12:49:19 +02:00
Terts Diepraam
05c8883b1a
Merge pull request #2395 from miDeb/timeout/cmd-args
timeout: handle arguments for the command to run
2021-06-14 12:01:31 +02:00
Terts Diepraam
b6f27a9a63
Merge pull request #2358 from siebenHeaven/du_threshold
Implement du threshold argument handling
2021-06-14 10:58:30 +02:00
Michael Debertol
d8c8e6774f tests/pr: formatting 2021-06-12 18:03:00 +02:00
Michael Debertol
bb029193e2 tests/pr: prevent races
Allow any timestamp from the start of the command to its end to show up
in stdout.
2021-06-12 18:03:00 +02:00
Michael Debertol
8e7eedebe7 tests: take slices in stdout_is_fixture 2021-06-12 18:03:00 +02:00
Anup Mahindre
fa12b46c51 tests: Add test for du threshold feature 2021-06-12 19:56:05 +05:30
Michael Debertol
af6e92e012 Merge branch 'master' of https://github.com/uutils/coreutils into sort/args 2021-06-12 13:16:46 +02:00
Michael Debertol
a69c2d52f9 Merge branch 'master' of https://github.com/uutils/coreutils into timeout/cmd-args 2021-06-12 13:14:16 +02:00
Terts Diepraam
440eba628c
Merge pull request #2338 from miDeb/ln/dst-symlink
ln: canonicalize the parent directory of the destination, not the destination itself
2021-06-12 11:28:19 +02:00
Terts Diepraam
8afc923796
Merge pull request #2237 from wfscheper/wfscheper/issue2118
chgrp: replace getopts with clap (#2118)
2021-06-12 11:20:24 +02:00
Jan Scheer
39f5f70f2b Merge branch 'master' into refactoring_parse_size 2021-06-12 02:24:07 +02:00
Michael Debertol
b8d4411291 sort: fix ignore-leading-blanks long option 2021-06-11 20:46:23 +02:00
Michael Debertol
fb035aa049 sort: allow --check=<value> syntax
* --check=silent and --check=quiet, which are equivalent to -C.
* --check=diagnose-first, which is the same as --check

We also allow -c=<value>, which confuses GNU sort.
2021-06-11 20:46:23 +02:00
Terts Diepraam
ddb196dd1d chgrp: fix clippy and spell-check warnings 2021-06-11 17:24:12 +02:00
Syukron Rifail M
0c364e635b du: add --one-file-system 2021-06-11 16:18:57 +07:00
Walter Scheper
cff75f242a chgrp: replace getopts with clap (#2118) 2021-06-10 16:38:44 -04:00
Michael Debertol
0f9bc8e974 timeout: disable timeout if it is set to zero 2021-06-10 21:24:43 +02:00
Michael Debertol
8e0ed2d20e timeout: support --verbose 2021-06-10 21:24:43 +02:00
Michael Debertol
c5d7cbda32 timeout: handle arguments for the command to run
To prevent clap from parsing flags for the command to run as flags for
timeout, remove the "args" positional argument, but allow to pass flags
via the "command" positional arg.
2021-06-10 17:03:32 +02:00
Michael Debertol
5997853cc4 Merge branch 'master' of https://github.com/uutils/coreutils into ln/dst-symlink 2021-06-10 16:06:32 +02:00
Sylvestre Ledru
def5bec1ce
Merge pull request #2373 from tertsdiepraam/groups/use-id-in-tests
`groups`: fix test for Arch-based systems
2021-06-09 22:44:51 +02:00
Jan Scheer
be8650278b Merge branch 'master' into refactoring_parse_size 2021-06-09 13:44:40 +02:00
Terts Diepraam
145e705b74 groups: fix clippy lint in test 2021-06-09 12:39:25 +02:00
Terts Diepraam
06b6066e89 groups: enable tests for non-linux unix systems 2021-06-08 22:53:48 +02:00
Sylvestre Ledru
4471335609
Merge pull request #2360 from rivy/fix+rf
build and *lots* of clippy fixes
2021-06-08 22:06:11 +02:00
Terts Diepraam
d846c40372 groups: fix test for arch 2021-06-08 21:45:02 +02:00
Jan Scheer
26ad05cbb4 uucore: fix order of group IDs returned from entries::get_groups()
As discussed here: https://github.com/uutils/coreutils/pull/2361
the group IDs returned for GNU's 'group' and GNU's 'id --groups'
starts with the effective group ID.
This implements a wrapper for `entris::get_groups()` which mimics
GNU's behaviour.

* add tests for `id`
* add tests for `groups`
* fix `id --groups --real` to no longer ignore `--real`
2021-06-08 18:39:05 +02:00
Roy Ivy III
1faa9eebab refactor/polish ~ cargo make format 2021-06-06 19:28:25 -05:00
Roy Ivy III
9feff1e441 tests ~ fix cargo clippy complaint (*allow* clippy::needless_borrow; for *false positives*) 2021-06-06 19:28:25 -05:00
Roy Ivy III
26cb6540da tests ~ fix cargo clippy complaint (clippy::useless_format) 2021-06-06 19:28:25 -05:00
Roy Ivy III
0dc8c18bac tests ~ fix cargo clippy complaint (clippy::needless_borrow) 2021-06-06 19:28:25 -05:00
Roy Ivy III
5553416b87 tests ~ fix clippy complaint (clippy::bool_assert_comparision) 2021-06-06 19:17:18 -05:00
Jan Scheer
0033928128 sort: fix broken tests for '--batch-size' (replace 'B' with 'b')
https://github.com/uutils/coreutils/pull/2297#issuecomment-855460881
2021-06-06 22:56:11 +02:00
Jan Scheer
12de58aec0 Merge branch 'master' of github.com:uutils/coreutils into refactoring_parse_size 2021-06-06 22:54:02 +02:00
Michael Debertol
7c9da82b39 sort: implement --batch-size 2021-06-06 18:01:08 +02:00
Michael Debertol
8d213219c7 sort: implement --compress-program 2021-06-06 18:01:08 +02:00
Michael Debertol
5a5c7c5a34 sort: properly check for empty reads 2021-06-06 18:01:08 +02:00
Michael Debertol
66359a0f56 sort: insert line separators after non-empty files
If files don't end witht a line separator we have to insert one,
otherwise the last line will be combined with the first line of the next
file.
2021-06-06 18:01:08 +02:00
Michael Debertol
e7fa6715a7 Merge branch 'master' of https://github.com/uutils/coreutils into ln/dst-symlink 2021-06-04 19:42:19 +02:00
Jan Scheer
81e07a6a4d od: replace 'piped_stdin' to make test stable 2021-06-04 17:22:45 +02:00