Terts Diepraam
2c130ae7c0
ls: take -l
into account with dereference-command-line
2021-04-14 14:42:14 +02:00
Terts Diepraam
5c28ac1b0d
ls: dereference command line
2021-04-14 14:12:00 +02:00
Sylvestre Ledru
9ae4928b7b
Ignore a test ( #2053 )
...
* Disable chksum: test_arg_overrides_stdin
fails often with:
---- test_cksum::test_arg_overrides_stdin stdout ----
current_directory_resolved:
touch: /tmp/.tmpv9hydc/a
run: /target/x86_64-unknown-linux-gnu/debug/coreutils cksum a
thread 'test_cksum::test_arg_overrides_stdin' panicked at 'Broken pipe (os error 32)', tests/common/util.rs:742:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
* rustfmt the recent change
2021-04-09 10:14:41 +02:00
electricboogie
8474249e5f
Sort: Implement stable sort, ignore non-printing, month sort dedup, auto parallel sort through rayon, zero terminated sort, check silent ( #2008 )
2021-04-08 22:07:09 +02:00
Terts Diepraam
c65483f4be
tests: improve docstrings a bit
2021-04-07 11:48:21 +02:00
Terts Diepraam
2997413d64
ls: refactor tests
2021-04-07 11:48:01 +02:00
paulotten
52706372aa
Replace outdated time 0.1 dependancy with latest version of chrono ( #2044 )
...
* Replace outdated time 0.1 dependancy with latest version of chrono
I also noticed that times are being miscalculated on linux, so I fixed that.
* Add time test for issue #2042
* Cleanup use declarations
* Tie time test to `touch` feature
- if we compile with the right OS feature flag then we should have it,
even on Windows
2021-04-07 08:41:04 +02:00
Sylvestre Ledru
b2b45d8af2
Merge branch 'master' into fold-backspace-and-carriage-return
2021-04-06 22:53:10 +02:00
Yagiz Degirmenci
c965effe07
fold: move to clap, add tests ( #2015 )
2021-04-06 22:51:27 +02:00
Sylvestre Ledru
f498a970d9
Merge pull request #2032 from jhscheer/test_relpath
...
relpath: refactor tests for #1982
2021-04-06 22:45:44 +02:00
Daniel Rocco
56bc7a44eb
fold: preserve carriage return and overwritten chars in output
2021-04-06 06:55:52 -04:00
Daniel Rocco
0b731dfd1a
fold: preserve backspace and overwritten chars in output
2021-04-06 06:55:52 -04:00
Sylvestre Ledru
31e91eb9b0
Merge pull request #2038 from jhscheer/test_refactor
...
Some more test refactors for #1982
2021-04-06 08:53:14 +02:00
Jan Scheer
057ceebdb0
rm: refactor tests for #1982
2021-04-06 00:04:49 +02:00
Jan Scheer
cc30aead22
realpath: refactor tests for #1982
2021-04-05 23:55:02 +02:00
Jan Scheer
de757cb025
tee: refactor tests for #1982
2021-04-05 23:05:07 +02:00
Sylvestre Ledru
f57eb0fdfa
Merge pull request #1993 from cbjadwani/master
...
uniq: Implement --group option
2021-04-05 22:33:04 +02:00
Sylvestre Ledru
7cdeb18dff
Merge pull request #2026 from tertsdiepraam/ls/hide_and_ignore
...
ls: --hide and --ignore
2021-04-05 22:31:23 +02:00
Yagiz Degirmenci
cbe07c93c6
cksum: add tests and fixtures ( #1923 )
2021-04-05 22:21:21 +02:00
Marvin Hofmann
9581fcf688
rm: add verbose output and trim multiple slashes ( #1988 )
...
* rm: add verbose output and trim multiple slashes
Uses the normalize_path used in cargo to strip duplicate slashes
With a link to a std rfc https://github.com/rust-lang/rfcs/issues/2208
This fixes https://github.com/uutils/coreutils/issues/1829
This also touches https://github.com/uutils/coreutils/issues/1768
but does not attempt to fully solve it
2021-04-05 22:18:47 +02:00
Jan Scheer
4dfbbecc26
relpath: refactor tests for #1982
2021-04-05 21:48:39 +02:00
Daniel Rocco
e5c61a28be
fold: variable width tabs, guard treating tab as whitespace
...
Treat tab chars as advancing to the next tab stop rather than having a fixed
8-column width.
Also treat tab as a whitespace split target only when splitting on word
boundaries.
2021-04-05 08:55:07 -04:00
Terts Diepraam
a50eae76a4
ls: some more tests for ignore & hide
2021-04-05 12:17:42 +02:00
Terts Diepraam
bbb27800c9
ls: fix windows tests and commit lock
2021-04-04 23:14:55 +02:00
Terts Diepraam
76308dbec9
ls: tests for invalid patterns for hide and ignore
2021-04-04 22:35:22 +02:00
Terts Diepraam
fa4272a19b
ls: --hide and --ignore
2021-04-04 19:19:56 +02:00
Sylvestre Ledru
bd8b129d9a
Merge pull request #2016 from tertsdiepraam/ls/control_characters
...
ls: show/hide control chars
2021-04-04 18:38:15 +02:00
Sylvestre Ledru
c196f4ae8b
Merge pull request #2023 from ycd/cut
...
cut: move to clap, add gnu like error messages + tests
2021-04-04 14:47:15 +02:00
Chirag Jadwani
19c6a42de5
uniq: implement group option
2021-04-04 15:22:17 +05:30
Daniel Rocco
bad1df9c1b
fold: improve newline handling and test coverage
...
- refactor implementation for readability
- correct handling of files with no trailing newline and/or blank lines
2021-04-03 22:47:38 -04:00
Yagiz Degirmenci
f47345ec9b
cut: add gnu compatability to error messages
2021-04-03 20:55:10 +03:00
Terts Diepraam
54e9cb09da
ls: add tests for --hide-control-chars
2021-04-03 16:44:12 +02:00
Sylvestre Ledru
7750db4f8e
cat: add a trivial test
2021-04-03 16:06:57 +02:00
Terts Diepraam
9cb0fc2945
ls: forgot to push updated tests
2021-04-03 13:15:19 +02:00
Jamie Quigley
31f5666727
more: add error message if the argument is a directory ( #1983 )
2021-04-02 22:34:02 +02:00
Juliana Rodrigueiro
97da14fcb2
install: Fix behaviour of the -d flag
...
The '-d' flag should create all ancestors (or components) of a
directory regardless of the presence of the "-D" flag.
From the man page:
-d, --directory
treat all arguments as directory names; create all components of the specified directories
With GNU:
$ install -v -d dir1/di2
install: creating directory 'dir1'
install: creating directory 'dir1/di2'
With this version:
$ ./target/release/install -v -d dir3/di4
install: dir3/di4: No such file or directory (os error 2)
install: dir3/di4: chmod failed with error No such file or directory (os error 2)
install: created directory 'dir3/di4'
Also, one of the unit tests misinterprets what a "component" is,
and hence was fixed.
2021-04-02 20:04:25 +01:00
Sylvestre Ledru
4934af0c3d
Merge pull request #2007 from drocco007/fold-preserve-blank-lines
...
fold: preserve blank lines
2021-04-02 20:00:05 +02:00
Daniel Rocco
d12f96d9ca
fold: preserve blank lines
2021-04-02 10:14:11 -04:00
ReggaeMuffin
2eb32d845e
chores: run cargo +1.40.0 fmt
...
Apparently fmt from 1.40.0 is a bit more strict in some places
Let me know if this is worthwhile merging :)
2021-04-02 10:56:49 +01:00
Sylvestre Ledru
de6aa69259
Merge pull request #1997 from sylvestre/polish3
...
Rustfmt+clippy+cargo.lock update
2021-04-02 11:37:56 +02:00
Jan Scheer
4a6176855a
relpath: move from getops to clap ( #1939 ) ( #1990 )
...
* relpath: add tests
* relpath: move from getopts to clap
2021-04-02 09:55:57 +02:00
Paul Otten
7859bf885f
Consistency with GNU version of du
when doing du -h
on an empty file
2021-04-01 19:42:43 -04:00
Sylvestre Ledru
dcbcf01665
Fix some clippy warnings
2021-04-01 23:42:30 +02:00
paulotten
090d29496a
Issue #1622 port du
to windows ( #1788 )
...
* Issue #1622 port `du` to windows
* Attempt to support Rust 1.32
Old version was getting "attributes are not yet allowed on `if`
expressions" on Rust 1.32
* Less #[cfg]
* Less duplicate code.
I need the return and the semicolon after if otherwise the second #[cfg]
leads to unexpected token complilation error
* More accurate size on disk calculations for windows
* Expect the same output on windows as with WSL
* Better matches output from du on WSL
* In the absence of feedback I'm disabling these tests on Windows.
They require `ln`. Windows does not ship with this utility.
* Use the coreutils version of `ln` to test `du`
`fn ccmd` is courtesy of @Artoria2e5
* Look up inodes (file ids) on Windows
* One more #[cfg(windows)] to prevent unreachable statement warning on linux
2021-04-01 23:16:47 +02:00
Terts Diepraam
2941dfd698
ls: quoting style ( #1989 )
2021-04-01 22:50:13 +02:00
Sylvestre Ledru
cc9c846032
Merge pull request #1991 from Mikadore/od_test
...
od: refactor tests for #1982
2021-04-01 09:50:25 +02:00
Mikadore
bb3e93372f
od: refactor tests for #1982
2021-04-01 02:16:15 +02:00
Yagiz Degirmenci
e958864bd9
tac: exit with proper code, move from getopts to clap, add test for invalid inputs ( #1957 )
2021-03-31 21:21:10 +02:00
Mikadore
b8079098f2
fixed panic! formatting
2021-03-31 13:30:06 +02:00
Mikadore
96643d6f91
fix #1970 ( #1980 )
2021-03-31 03:54:16 -07:00