Commit graph

4150 commits

Author SHA1 Message Date
Neculai Balaban a1b50ae0f4
nohup: move from getopts to clap (#1871)
- changed some error return codes to match GNU implementation
- changed warning/error messages to match GNU nohup
- replaced getopts dependency with clap
- added a test
2021-03-22 20:09:00 +01:00
Yagiz Degirmenci 20dec4cbba
fix: fix clippy warnings (#1876) 2021-03-22 20:08:07 +01:00
James Robson 56da6b4a2c Fix test setup 2021-03-22 17:48:12 +00:00
Terts Diepraam de3f9b8186
ls: across & commas formats and width parameter (#1869) 2021-03-22 18:24:23 +01:00
Yagiz Degirmenci d86ee34bc6
tsort: move from getopts to clap (#1867) 2021-03-22 18:16:28 +01:00
Sylvestre Ledru f593cf53b2
Merge pull request #1870 from nomius10/document_macros
documentation for usual macros
2021-03-22 11:59:11 +01:00
Neculai Balaban 93c7cbe65e documentation for usual macros
- removed repeat_str helper as it's now part of std
- added docstrings for usual macros and test utils
2021-03-22 12:13:38 +02:00
Terts Diepraam b9662c78a5
ls: possible fix for access time tests (#1866) 2021-03-22 10:14:59 +01:00
Yagiz Degirmenci 27b7552ef4
fix(tail): add support for negative indexing (#1865)
closes: https://github.com/uutils/coreutils/issues/1860
2021-03-22 10:01:54 +01:00
James Robson 027d5e6d9d Fix yaml syntax 2021-03-21 22:31:15 +00:00
Sylvestre Ledru 21be280c5a rustfmt the od changes 2021-03-21 22:22:21 +01:00
James Robson 40677bdc7a Fix more problems with utils that aren't being tested 2021-03-21 20:49:15 +00:00
Yagiz Degirmenci 6c98415340
fix(head): check the whether file exists before unwrap (#1858)
closes https://github.com/uutils/coreutils/issues/1800
2021-03-21 21:27:44 +01:00
Sylvestre Ledru 734368bc92 refresh cargo.lock with recent updates 2021-03-21 17:03:58 +01:00
pedrohjordao ca8fbc37bf
od: Changes command line parser to clap (#1849) 2021-03-21 16:19:30 +01:00
Yagiz Degirmenci f60790dd41
chroot: move to clap from getopts (#1792)
+ add tests
2021-03-21 16:18:47 +01:00
Terts Diepraam 25d4a08387
ls: long format author, group and owner (#1850)
This PR adds the options to customize what information is shown in long format regarding author, group & owner. Specifically it adds:
- `--author`: shows the author, which is always the same as the owner. GNU has this feature because GNU/Hurd supports a difference between author and owner, but I don't think Rust supports GNU/Hurd, so I just used the owner.
- `-G` & `--no-group`: hide the group information.
- `-o`: hide the group and use long format (equivalent to `-lG`).
- `-g`: hide the owner and use long format.

The `-o` and `-g` options have some interesting behaviour that I had to account for. Some examples:
- `-og` hides both group and owner.
- `-ol` still hides the group. Same behaviour with variations such as `-o --format=long`, `-gl`, `-g --format=long` and `-ogl`.
- They even retain some information when overridden by another format: `-oCl` (or `-o --format=vertical --format=long`) still hides the group.

My previous solution for handling the behaviour where `-l1` shows the long format did not fit with these additions, so I had to rewrite that as well.

The tests only cover the how many names (author, group and owner) are present in the output, so it can't distinguish between, for example, author & group and group & owner.
2021-03-21 16:18:06 +01:00
James Robson 0f77b54aeb Fix typo 2021-03-21 15:11:48 +00:00
James Robson 4352d47ac3 Don't fail the job if test-suite.log is missing 2021-03-21 14:45:34 +00:00
James Robson 0a661a6da2 Remove use of which to set system binaries 2021-03-20 22:15:47 +00:00
Sylvestre Ledru 45acb087b8
Merge pull request #1848 from nomius10/install_bugfix
install: fix bug #1823
2021-03-20 20:53:57 +01:00
Neculai Balaban 220ca78c9b install: normalize test filenames 2021-03-20 20:42:47 +02:00
Neculai Balaban 9b0eee9066 install: added additional tests 2021-03-20 20:07:19 +02:00
Neculai Balaban f8125a1040 install: match GNU warning output 2021-03-20 16:11:29 +02:00
Neculai Balaban ecddaf577a install: rustfmt test 2021-03-20 15:44:41 +02:00
Dominik Bittner 7a91281976 Install: remove path when copining files
- add a test for copying a file from one directory to another
- add the desired behavior

Fixes #1823
2021-03-20 15:35:40 +02:00
Neculai Balaban 0f7423dfa6 install: fix bug #1823 2021-03-20 14:49:22 +02:00
nicoo 8b9ac0c7c3
Revert #1571 “perf/factor ~ deduplicate divisors” (#1842)
It was a draft PR, not ready for merging, and its premature inclusion
caused repeated issues, see 368f47381b & friends.

Close #1841.

This reverts commits 3743a3e1e7,
                     ce218e01b6, and
                     b7b0c76b8e.
2021-03-20 11:46:58 +01:00
Alex Lyon e9adc5067b
cksum: generate CRC table in a const fn (#1744) 2021-03-20 10:33:04 +01:00
Sylvestre Ledru d1fc42a7c9 refresh cargo.lock with recent updates 2021-03-20 10:28:06 +01:00
Sylvestre Ledru 9a6ecdb470
Merge pull request #1846 from marcosatti/master
date: add more tests for setting (alt. formats)
2021-03-20 10:27:25 +01:00
Marco Satti 785897efbd date: add more tests for setting (alt. formats) 2021-03-20 15:17:18 +08:00
Jan Scheer 0e217e202a
tee: move from getopts to clap (#1814) 2021-03-19 22:58:50 +01:00
Sylvestre Ledru e76ce1e908
Merge pull request #1844 from tertsdiepraam/ls/si
ls: --si flag and more compatible size formatting
2021-03-19 21:18:25 +01:00
Neculai Balaban c6927d97c8
cp: add support for -x/--one-file-system (#1840) 2021-03-19 21:15:35 +01:00
Sylvestre Ledru 9132d32315 Rustfmt the tests 2021-03-19 18:01:43 +01:00
Terts Diepraam 39b07f670f tests/ls: adapt tests to --si and new size formats 2021-03-19 15:15:24 +01:00
Terts Diepraam 118b802fe8 ls: --si and more compatible size formatting 2021-03-19 15:14:25 +01:00
Sylvestre Ledru 976fa95ce8 fix(ls): fix a clippy warning
"this `if` has identical blocks"
2021-03-19 14:25:07 +01:00
Sylvestre Ledru 621511dcac Update cargo.lock 2021-03-19 14:24:25 +01:00
Sylvestre Ledru e521b46c09
Merge pull request #1820 from tertsdiepraam/master
ls: move from getopts to clap and structure configuration
2021-03-19 09:55:27 +01:00
Marco Satti 5ec87dc70a
date: Implement setting the date on Unix & Windows (#1798)
* date: implement set date for unix and windows

Parsing the date string is not fully implemented yet, as in it relies
on the internals of chrono - things like "Mon, 14 Aug 2006 02:34:56 -0600"
do not work, nor does "2006-08-14 02:34:56" (no TZ / local time). This
is no different to using the "--date" option however, and will get fixed
when `parse_date` is a bit smarter.

Only supports unix and Windows platforms for now.
2021-03-19 09:54:01 +01:00
James Robson c804ec3ba3 Merge branch 'master' into polish-gnu-tests 2021-03-18 20:59:41 +00:00
Sylvestre Ledru fcccc2a973
Merge pull request #1826 from pfnsec/master
head: add support for -z/--zero-terminated
2021-03-18 21:37:12 +01:00
Jan Scheer 58b9372dbe rm: fix for -d to match GNU's output #1769 2021-03-18 14:46:56 +01:00
Sylvestre Ledru 22e22bc074
Merge pull request #1835 from aspenluxxxy/update-nix
Update nix to 0.13 in uu_more
2021-03-18 14:37:54 +01:00
Sylvestre Ledru a482e28798
Merge pull request #1836 from aspenluxxxy/ios-compat
Change target_os = "macos" to target_vendor = "apple"
2021-03-18 14:37:26 +01:00
Sylvestre Ledru cb6871d2a0
Merge pull request #1838 from sylvestre/polish
Update cargo.lock + rustfmt some new tests
2021-03-18 13:47:34 +01:00
aspen 4e29b693f8
uutils: change every target_os = "macos" to target_vendor = "apple" 2021-03-18 08:42:53 -04:00
aspen ed7e24c5b0
uu_more: update nix to 0.13 2021-03-18 08:39:06 -04:00