Daniel Hofstetter
ff500d7d6f
expr: interpret numbers != 0 as true for | and &
2023-09-26 16:24:00 +02:00
Sylvestre Ledru
99120d32c1
cut: fail when the input == usize::MAX
2023-09-26 09:40:21 +02:00
Leviticoh
b90b59c003
uniq: added support for deprecated -N
option ( #4228 )
2023-09-24 14:44:44 +02:00
Sylvestre Ledru
e8b27d1714
Merge pull request #4527 from bbara/dd-skip-seek
...
dd: fix GNU test 'dd/skip-seek-past-dev'
2023-09-24 14:43:15 +02:00
Terts Diepraam
4ca792d2ff
Merge pull request #5306 from cakebaker/nl_fix_output_order_if_stdin_and_files_are_mixed
...
nl: fix output order if stdin and files are mixed
2023-09-24 12:12:54 +02:00
tommady
bd0fb817a7
cp: fix the result of inodes are not the same when preserve links is flagged ( #5064 )
...
Should fix:
```
rm -rf a b c
touch a
ln -s a b
mkdir c
./target/debug/coreutils cp --preserve=links -R -H a b c
a_inode=$(ls -i c/a|sed 's,c/.*,,')
b_inode=$(ls -i c/b|sed 's,c/.*,,')
echo "$a_inode" = "$b_inode"
```
2023-09-24 10:53:27 +02:00
Benjamin Bara
17f4d17021
tests: dd: add skip-seek-past-dev tests
...
These tests try to read or write past a block device, where the block device is either given as
stdin or stdout. It requires access to the block device, and therefore is executed as root. For now,
it is assumed that a block device "/dev/sda1" with a size smaller than 10000000000000000 exists.
2023-09-24 10:00:10 +02:00
Benjamin Bara
616c3f4a7f
util: extend run_ucmd_as_root for stdin/stdout
...
This enables to give path to files (as str) which are then used as either stdin or stdout.
2023-09-24 10:00:10 +02:00
Daniel Hofstetter
06219350fa
nl: fix output order if stdin and files are mixed
2023-09-23 14:44:30 +02:00
Sylvestre Ledru
ba3f266b2c
Merge pull request #5285 from cakebaker/nl_multiple_files
...
nl: make line number and --join-blank-lines work over multiple files
2023-09-23 09:34:04 +02:00
Sylvestre Ledru
d6da6fb546
Merge pull request #5302 from cakebaker/relpath_fix_5300
...
relpath: show error if no argument provided
2023-09-22 23:30:52 +02:00
Daniel Hofstetter
38831c46d1
relpath: show error if no argument provided
...
Fixes #5300
2023-09-22 10:58:12 +02:00
Daniel Hofstetter
0794d1338d
ls: fix test which fails if /tmp uses tmpfs
2023-09-22 10:43:23 +02:00
Sylvestre Ledru
9b4d2c6bc4
ls: implement --dired
...
* Support ls --dired
* stat-failed.sh: update of the test - we have a small difference
* ls --dired: address some of the comments
* fix warnings
* use unwrap()
* Improve test
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* Simplify test
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* Remove a word from the spell ignore
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* remove duplication of the spell ignore
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* rustfmt
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-09-20 08:17:46 +02:00
Daniel Hofstetter
1a30a1b8b6
nl: support --join-blank-lines over multiple files
2023-09-19 10:47:20 +02:00
Daniel Hofstetter
1107fadca9
nl: increase line number over multiple files
2023-09-19 10:47:00 +02:00
Sylvestre Ledru
37ee889003
ls -l: show an error when symlink not readable
...
switching to match and handle the error
Will help with tests/ls/stat-failed.sh
2023-09-15 22:34:17 +02:00
Daniel Hofstetter
39a0e92a91
Merge pull request #5255 from granquet/split_filter_broken_pipe
...
split: catch broken pipe error for round robin strategy
2023-09-13 14:08:45 +02:00
Daniel Hofstetter
aa7b39ae49
split: fix formatting
2023-09-13 10:45:38 +02:00
Guillaume Ranquet
d4217c5a12
split: catch broken pipe error for round robin strategy
...
The broken pipe error is not handled in the case of the round robin
strategy (typically used with --filter).
Align to the other strategies to silence that error in that use case
too.
fixes #5191
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-09-12 17:43:31 +02:00
Daniel Hofstetter
6ce80758d5
touch: fix deprecation warnings from chrono
...
datetime_from_str() has been deprecated
2023-09-12 15:08:21 +02:00
Sylvestre Ledru
80f8eb6724
Merge pull request #5252 from zhitkoff/split-gnu-test-fail.sh
...
split: implement remaining -n variants and pass GNU tests/split/fail.sh
2023-09-07 17:15:09 +02:00
zhitkoff
3f065eed8a
split: fixing test for 32bit
2023-09-06 21:04:01 -04:00
zhitkoff
8883f016d4
split: fix windows tests
2023-09-06 20:09:26 -04:00
zhitkoff
3be284e0d9
split: more test coverage
2023-09-06 19:49:26 -04:00
zhitkoff
fbf5ac4329
split: tests 32bit
2023-09-06 14:16:21 -04:00
zhitkoff
1669a92694
split: tests overflow
2023-09-06 14:02:08 -04:00
zhitkoff
4fd598e4d5
split: tests
2023-09-06 13:20:58 -04:00
zhitkoff
e378454a26
split: formatting
2023-09-06 13:15:35 -04:00
zhitkoff
d8a16a2351
split: tests
2023-09-06 12:42:49 -04:00
zhitkoff
a0a9ee6491
split: fixing tests for parse_size_max()
2023-09-05 18:42:16 -04:00
David Matos
8be6338da9
cp: Error out if cp only contains source
2023-09-05 23:35:14 +02:00
Yury Zhytkou
e0b000a3bc
Merge branch 'main' into split-gnu-test-fail.sh
2023-09-05 17:22:31 -04:00
Daniel Hofstetter
4992cb9b86
Use std::io::IsTerminal instead of is-terminal
2023-09-04 10:35:17 +02:00
Daniel Hofstetter
8920ac0123
split: fix clippy warning in test
2023-09-04 07:26:23 +02:00
zhitkoff
420965a3ab
prereq for fixing tests/split/fail.sh
2023-09-03 20:39:50 -04:00
Sylvestre Ledru
633ae06524
Merge pull request #5225 from tertsdiepraam/factor-short-circuit-write-error
...
`factor`: short circuit on write error, but not on parse error
2023-09-01 21:09:25 +02:00
zhitkoff
e597189be7
split: fixed windows test for invalid unicode args
2023-08-31 20:48:44 -04:00
zhitkoff
d2812cbbc3
split: disable windows test for invalid UTF8
2023-08-31 16:04:44 -04:00
zhitkoff
5bfe9b19ef
split: avoid using collect_lossy
+ test for invalid UTF8 arguments
2023-08-31 14:46:56 -04:00
zhitkoff
6f37b4b4cf
split: hyphenated values + tests
2023-08-30 19:29:57 -04:00
Terts Diepraam
9a67393c44
factor: short circuit on write error, but not on parse error
2023-08-30 18:51:29 +02:00
zhitkoff
7f905a3b8d
split: edge case for obs lines within combined shorts + test
2023-08-29 16:35:00 -04:00
zhitkoff
15c7170d20
split: fix for GNU Tests regression + tests
2023-08-29 15:49:47 -04:00
Terts Diepraam
93a54f36f3
hashsum: change debug to display format with --tag
2023-08-29 10:15:38 +02:00
zhitkoff
fa8d18b826
split: refactor obsolete lines
2023-08-28 18:24:21 -04:00
Yury Zhytkou
1eae064e5c
split: better handle numeric and hex suffixes, short and long, with and without values ( #5198 )
...
* split: better handle numeric and hex suffixes, short and long, with and without values
Fixes #5171
* refactoring with overrides_with_all() in args definitions
* fixed comments
* updated help on suffixes to match GNU
* comments
* refactor to remove value_parser()
* split: refactor suffix processing + updated tests
* split: minor formatting
2023-08-28 10:09:52 +02:00
zhitkoff
84d96f9d02
split: refactor for more common use case
2023-08-26 11:11:46 -04:00
Daniel Hofstetter
01b2834f2e
Fix clippy warnings with Rust 1.72.0
2023-08-25 13:22:02 +02:00
Terts Diepraam
c3f9e19a3b
all: normalize license notice in all *.rs files
2023-08-24 12:21:09 +02:00