Commit graph

515 commits

Author SHA1 Message Date
Marco Satti
785897efbd date: add more tests for setting (alt. formats) 2021-03-20 15:17:18 +08: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
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
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
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
aspen
4e29b693f8
uutils: change every target_os = "macos" to target_vendor = "apple" 2021-03-18 08:42:53 -04:00
Sylvestre Ledru
1d271991af Rustfmt new tests 2021-03-18 10:24:30 +01:00
Terts Diepraam
c5792a4c47 tests/ls: add tests for colors 2021-03-17 23:15:03 +01:00
Sylvestre Ledru
99be7a3172
Merge pull request #1810 from jeckersb/nice-clap
nice: move from getopts to clap #1794
2021-03-17 22:03:42 +01:00
Sylvestre Ledru
44a7adc9a0
Merge pull request #1812 from konomith/feature/preserve_timestamps_#1758
install: Implement --preserve-timestamps (-p)
2021-03-17 22:02:54 +01:00
Sylvestre Ledru
a690ffde41
Merge pull request #1821 from deantvv/expand-clap
expand: replace getopts with clap
2021-03-17 22:01:31 +01:00
Sylvestre Ledru
6a109a5069
Merge pull request #1834 from jhscheer/patch-3
rm: add an additional flag -R for --recursive
2021-03-17 21:52:02 +01:00
Sylvestre Ledru
ba55ef166e
Merge pull request #1827 from drocco007/numfmt-delimiter
numfmt: implement --delimiter
2021-03-17 21:50:47 +01:00
John Eckersberg
64b8c8aac7 nice: move from getopts to clap #1794 2021-03-17 08:52:13 -04:00
Daniel Rocco
fbb9c50050 tr: process octal escape sequences
closes #1817
2021-03-17 08:04:45 -04:00
Jan Scheer
867e117c99
Update test_rm.rs 2021-03-17 10:20:08 +01:00
Sylvestre Ledru
618d4a4fa5
Merge pull request #1825 from cbjadwani/uniq-utf8-issues
uniq: utf-8 issues
2021-03-16 21:18:31 +01:00
Peter Sherman
13e61c3234 head: add support for -z/--zero-terminated 2021-03-15 15:56:11 +00:00
Daniel Rocco
52f2ab6898 numfmt: implement --delimiter
closes #1454
2021-03-15 11:55:56 -04:00
Hari
406cd865eb
install: run rustfmt
Fix formatting issues based on PR review comments
2021-03-15 11:00:30 -04:00
Andre Julius
53c3fedf33 sleep: Add more test cases
As mentioned here:
https://github.com/uutils/coreutils/pull/1777#discussion_r593807712
2021-03-15 14:36:38 +01:00
Dean Li
f608084710 Expand: add test for multiple files 2021-03-15 21:29:28 +08:00
Chirag Jadwani
116e253cc0 uniq: Fix skip fields
Current implementation of the skip fields logic does not handle
multibyte code points correctly. It assumes each code point (`char`) is
one byte. If the skipped part of the input line has any multibyte code
points then this can cause fields not being skipped correctly (field
start index is calculated to be before it actually starts).
2021-03-15 18:48:54 +05:30
Chirag Jadwani
ce4342d12e uniq: Fix panic on invalid utf-8 input 2021-03-15 18:48:54 +05:30
Terts Diepraam
fd957dd148 ls: fix access time on windows 2021-03-15 14:09:29 +01:00
Terts Diepraam
10135dccef ls: fix unused import and improve coverage 2021-03-15 13:46:21 +01:00
Sylvestre Ledru
2c09556964 rustfmt some tests 2021-03-13 23:30:47 +01:00
Andre Julius
2158b2c5b4
sleep: move from getopts to clap #1735 (#1777)
and Add some sleep test cases #1735
2021-03-13 23:11:11 +01:00
Terts Diepraam
fd5ec099d0
touch: use an ArgGroup for sources and turn macros into functions (#1813)
* touch: use arggroup for sources

* tests/touch: add tests for multiple sources

* touch: turn macros into functions

* test/touch: fmt

* touch: constant for the sources ArgGroup
2021-03-13 17:20:39 +01:00
Hari
8471088d6d
Merge branch 'master' of github.com:uutils/coreutils into feature/preserve_timestamps_#1758 2021-03-12 17:47:02 -05:00
Hari
68ec2ed0f3
install: Implement --preserve-timestamps (-p)
Last access and last modify timestamps are extracted from the
existing file metadata and are applied to the newly created file.
2021-03-12 16:51:47 -05:00
Jan Scheer
47f50a0f5f
tests/utils: fixed mode for write (#1802)
added `log_info`
2021-03-12 22:26:27 +01:00
Michael Kefeder
e1626b8c64
ptx: ignore empty regex (#1808)
* ptx: ignore empty -W regex

* ptx: test to verify empty -W regex is ignored

* tests/ptx: verify word regexp from cmd-line is used
2021-03-12 21:52:37 +01:00
Ali
5ced3a670b
paste: cleanup multi-stdin support (#1803)
cleaner impl for multi-stdin support
2021-03-12 13:26:09 +01:00
Craig Pastro
3ab114f283
cp: Implement --parents & --parent (#1797) 2021-03-12 13:25:15 +01:00
Ali
374a4fde86
paste: support multi-stdin (#1791)
- added `-` as the default input, since `paste` reads stdin if no file
is provided
- `paste` also supports providing `-` multiple times
- added a test for it
2021-03-10 23:19:12 +01:00
Benjamin Fox
5446ea2abf cp: implement --strip-trailing-slashes 2021-03-09 12:59:26 +02:00
Daniel Rocco
0e02607dc7 numfmt: implement --field 2021-03-08 10:53:34 -05:00
Chad Brewbaker
c820329efd
muted test not for windows and added windows temp file convention (#1748)
* muted test not for windows and added windows temp file convention

* Update mktemp.rs

Revert windows mktmp template difference

Co-authored-by: Chad Brewbaker <chad@flyingdogsolutions.com>
2021-03-06 18:26:55 +01:00
Daniel Rocco
d06f91fbe2
numfmt: align format output values with GNU (#1745)
When converting to SI or IEC, produce values that align with the conventions
used by GNU numfmt.

- values > 10 are represented without a decimal place, so 10000 becomes 10K
  instead of 10.0K

- when truncating, take the ceiling of the value, so 100001 becomes 101K

- values < 10 are truncated to the highest tenth, so 1001 becomes 1.1K

closes #1726
2021-03-06 18:26:05 +01:00
Sylvestre Ledru
c06967a45a rustfmt two files 2021-02-23 20:56:41 +01:00
Chad Brewbaker
bb54669a5d
Fix macOS aarch64 compile errors (#1724) 2021-02-23 10:25:06 +01:00
Alex Lyon
5431e947bc
uucore: process: fix exit status processing (#1743)
* uucore: process: fix exit status processing

* tests: timeout: check whether subcommand exit codes are returned
2021-02-23 10:21:01 +01:00
James Robson
0dbed0fd59 Do not allow seq to run with an increment of zero 2021-02-18 21:10:53 +00:00
Chad Brewbaker
05d8cc59c4
bug(wc): Add a test for unexpected behavior (#1723) 2021-02-16 13:36:49 +01:00
Daniel Rocco
f595164063 numfmt: prohibit --header=0 to align with GNU
Adjust header option handling to prohibit passing a value of 0 to align
with GNU numfmt. Also report header option parse errors as GNU does.

closes #1708
2021-02-15 08:14:44 +01:00