Sylvestre Ledru
df683f8c84
Merge pull request #2465 from miDeb/install-test
...
[: install test as [ as well
2021-07-07 15:43:38 +02:00
Sylvestre Ledru
7018ff8925
Merge pull request #2477 from dhodder/uname_target_env
...
uname: don't report OS as "GNU/Linux" without GNU
2021-07-07 08:46:50 +02:00
Dave Hodder
330f797378
tests/uname: add --operating-system
test
2021-07-06 23:40:38 +01:00
Michael Debertol
8ace291b32
sort: make -k only take one argument per flag
...
This makes it so that `sort -k 1 file` treats `file` as the input file
and not the second key.
2021-07-06 15:47:32 +02:00
Michael Debertol
bc0727cc4d
[: add support for --help and --version
...
I copied the help text verbatim from GNU, I hope that's ok.
2021-07-06 13:15:07 +02:00
Sylvestre Ledru
1136221f6f
rustfmt the recent change
2021-07-04 13:01:31 +02:00
Sylvestre Ledru
ae1935c3cb
Merge branch 'master' into master
2021-07-04 11:57:59 +02:00
Sylvestre Ledru
91078cfcb3
Merge pull request #2445 from syukronrm/du-inodes
...
du: add `--inodes`
2021-07-04 11:28:03 +02:00
Sylvestre Ledru
d3652cc3c0
Merge pull request #2457 from Funky185540/install-implement-backup
...
install: implement --backup, -b and -S
2021-07-04 09:57:45 +02:00
Terts Diepraam
7a0a7aecc4
Merge pull request #2461 from miDeb/sort/check-no-out
...
sort: disable -o with -C and -c
2021-07-01 13:07:05 +02:00
Terts Diepraam
6213a2a967
Merge pull request #2462 from miDeb/sort/version
...
sort/ls: implement version cmp matching GNU spec
2021-07-01 13:02:59 +02:00
Terts Diepraam
73a7ead857
mktemp: adapt to standardized error handling
2021-06-28 13:55:55 +02:00
Syukron Rifail M
27e0507844
du: more tests
2021-06-28 07:51:17 +07:00
Syukron Rifail M
d8a33da5b3
du: add --inodes
2021-06-28 07:51:17 +07:00
Michael Debertol
d3732e08c4
sort: disable -o with -C and -c
2021-06-27 16:21:18 +02:00
Michael Debertol
233a778963
sort/ls: implement version cmp matching GNU spec
...
This reimplements version_cmp, which is used in sort and ls to sort
according to versions.
However, it is not bug-for-bug identical with GNU's implementation.
I reported a bug with GNU here:
https://lists.gnu.org/archive/html/bug-coreutils/2021-06/msg00045.html
This implementation does not contain the bugs regarding the handling of
file extensions and null bytes.
2021-06-27 15:29:17 +02:00
Andreas Hartmann
69e8838b27
tests: install: Add tests for '--backup'
...
Tests the '--backup' option for the install utility. Most of the code is
adapted from the respective tests for 'mv'.
2021-06-27 09:55:10 +02:00
Michael Debertol
548a895cd6
sort: compatibility of human-numeric sort
...
Closes #1985 .
This makes human-numeric sort follow the same algorithm as GNU's/FreeBSD's sort.
As documented by GNU in https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html ,
we first compare by sign, then by si unit and finally by the numeric value.
2021-06-25 18:19:00 +02:00
Sylvestre Ledru
ab5d581fa4
Merge pull request #2439 from tertsdiepraam/numfmt/round-and-c-locale
...
`numfmt`: add `--round` and other minor improvements
2021-06-24 21:18:59 +02:00
Sylvestre Ledru
5d7cf61128
Merge pull request #2429 from miDeb/install/target-dir
...
install: support --target-directory
2021-06-24 21:06:44 +02:00
Sylvestre Ledru
3b2d0d17fa
Merge pull request #2446 from jhscheer/groups_gnu_testsuite
...
groups: fixes to pass GNU's Testsuite
2021-06-23 20:15:12 +02:00
Sylvestre Ledru
44c770d234
Merge pull request #2450 from jhscheer/id_refactor_identifier
...
id: refactor identifiers
2021-06-23 19:05:57 +02:00
Jan Scheer
11f36eae3b
tests/groups: fix/add tests for (multiple) username(s)
2021-06-23 16:50:03 +02:00
Sylvestre Ledru
d40fc65ee6
Merge branch 'master' into numfmt/round-and-c-locale
2021-06-23 12:39:55 +02:00
Sylvestre Ledru
a73e71ba74
Merge pull request #2437 from miDeb/cp/reflink-auto
...
cp: default to --reflink=auto on linux and macos
2021-06-23 12:37:44 +02:00
Sylvestre Ledru
87eaf6e80a
Merge pull request #2447 from jhscheer/locale_c
...
fix some issues with locale (replace "LANGUAGE" with "LC_ALL")
2021-06-23 12:36:40 +02:00
Jan Scheer
4b3da59b0e
id: refactor identifiers
...
* change of identifier names and spelling according to the suggestions in the review of #2446
2021-06-23 12:27:01 +02:00
Jan Scheer
c0be979611
fix some issues with locale (replace "LANGUAGE" with "LC_ALL")
...
`LANGUAGE=C` is not enough, `LC_ALL=C` is needed as the environment
variable that overrides all the other localization settings.
e.g.
```bash
$ LANGUAGE=C id foobar
id: ‘foobar’: no such user
$ LC_ALL=C id foobar
id: 'foobar': no such user
```
* replace `LANGUAGE` with `LC_ALL` as environment variable in the tests
* fix the the date string of affected uutils
* replace `‘` and `’` with `'`
2021-06-23 11:30:28 +02:00
Sylvestre Ledru
178399c20e
Merge pull request #2449 from miDeb/temp-win
...
Make tests pass on a windows VM
2021-06-23 08:40:30 +02:00
Michael Debertol
ce0801db90
tests/mv: test uutils mv instead of system util
...
Calling `cmd_keepenv("mv")` spawned the system `mv` instead of
the uutils `mv`. Also, `keepenv` isn't necessary because it doesn't
need to inherit environment variables.
We now actually check the stderr, because previously the result of
`ends_with` was not used, making the test pass even when it shouldn't.
I disabled the test on windows because `mkdir` does not support `-m` on
windows, making the test fail because there will be no permission error.
On FreeBSD there isn't a permission error either, and `mv` succeeds.
2021-06-23 00:58:19 +02:00
Michael Debertol
622504467f
mktemp: note that windows uses a different env var for tmpdir
...
On windows `std::env::temp_dir` uses the `TMP` environment variable
instead of `TMPDIR`.
2021-06-22 17:44:45 +02:00
Michael Debertol
e5a7bcbb9d
tests: keep env vars for the temporary directory
...
On some Windows machines this would otherwise cause `std::env::temp_dir`
to fall back to a path that is not writeable (C:\\Windows).
Since by default integration tests don't inherit env vars from the
parent, we have to override this in some cases.
2021-06-22 17:43:46 +02:00
Sylvestre Ledru
e48ff9dd9e
Merge pull request #2441 from siebenHeaven/ls_dangling_symlinks
...
ls: Fix problems dealing with dangling symlinks
2021-06-21 22:34:15 +02:00
Sylvestre Ledru
2f11a23016
Merge pull request #2431 from miDeb/pr/races
...
tests/pr: include one more possible minute
2021-06-21 22:30:37 +02:00
Anup Mahindre
ffb6b7152f
tests: Fix ls dangling symbolic links test output for windows
...
On windows we do not print inode numbers at all, so skip checking for ?
for dangling symbolic links in expected output
2021-06-20 16:58:28 +05:30
Anup Mahindre
d0039df8c3
tests: Add test for dangling symlinks with ls
...
Add test similar to gnu dangling symlinks test
2021-06-20 13:50:38 +05:30
Roy Ivy III
f5edc500e0
tests ~ fix spelling errors
2021-06-19 18:40:22 -05:00
Terts Diepraam
3086e95702
numfmt: add round and use C locale style for errors
2021-06-20 00:21:14 +02:00
Sylvestre Ledru
115eb5eb52
Merge pull request #2432 from dezgeg/test-bracket-syntax
...
test: Implement [ expr ] syntax
2021-06-19 19:14:20 +02:00
Michael Debertol
9fb927aa85
cp: always delete the destination for symlinks
2021-06-19 18:59:57 +02:00
Tuomas Tynkkynen
7b9814c778
test: Implement [ expr ] syntax
...
When invoked via '[' name, last argument must be ']' or we bail out with
syntax error. Then the trailing ']' is simply disregarded and processing
happens like usual.
2021-06-19 18:49:21 +03:00
Sylvestre Ledru
5ba69d4a35
Merge pull request #2412 from syukronrm/du-dereference
...
du: add `--dereference`
2021-06-19 12:05:18 +02:00
Sylvestre Ledru
ac98960f32
Merge pull request #2427 from miDeb/ln/recursive-relative
...
ln: don't return an empty path in `relative_path`
2021-06-19 12:03:59 +02:00
Sylvestre Ledru
e2a00b67ed
Merge pull request #2428 from jhscheer/cut_2424
...
cut: fix `-d=` (#2424 )
2021-06-19 08:46:42 +02:00
Michael Debertol
285eeac1fb
tests/pr: include one more possible minute
2021-06-18 18:49:39 +02:00
Terts Diepraam
f1e043ca1b
Merge pull request #2361 from jhscheer/id_zero_2351
...
id: revamp to pass more of GNU's Testsuite
2021-06-18 18:10:49 +02:00
Terts Diepraam
e273cb8e4f
Merge pull request #2426 from miDeb/cp/symlinks
...
cp: improve symlink handling
2021-06-18 17:27:50 +02:00
Michael Debertol
4e62c9db71
install: support target-directory
2021-06-18 16:45:36 +02:00
Jan Scheer
65f47be5ee
cut: fix -d=
( #2424 )
2021-06-18 12:10:40 +02:00
Michael Debertol
3d3af5c8ca
ln: don't return an empty path in relative_path
2021-06-18 11:53:29 +02:00