Commit graph

2762 commits

Author SHA1 Message Date
Zhuoxun Yang
5a732dd21a tests/expr: add test expr 1 \| a / 5 2023-10-06 23:50:44 +08:00
Daniel Hofstetter
6dd53c7a71 clippy: fix warnings in tests 2023-10-06 10:11:26 +02:00
Terts Diepraam
9e9701974e
Merge pull request #5350 from cakebaker/echo_no_new_line
echo: don't output "\n" if "\c" is encountered
2023-10-03 17:35:58 +02:00
Daniel Hofstetter
54ba81ecbb mv: fix typo in test function name
test_mv_info_self -> test_mv_into_self
2023-10-03 15:09:20 +02:00
Daniel Hofstetter
c29bcb219f echo: don't output "\n" if "\c" is encountered 2023-10-03 14:37:15 +02:00
Daniel Hofstetter
139f205783
Merge pull request #5218 from tertsdiepraam/echo-fix-octal-wrapping
`echo`: fix wrapping behavior of octal sequences
2023-10-03 13:52:56 +02:00
Terts Diepraam
689b21d0b8
Merge pull request #5348 from cakebaker/cp_show_no_skipped_message
cp: show no "skipped" msg with -vi/-vin
2023-10-03 11:58:47 +02:00
Terts Diepraam
0f248d7525
Merge pull request #5347 from cakebaker/mv_show_no_skipped_message
mv: show no "skipped" msg with -vi/-vin
2023-10-03 11:58:31 +02:00
PGIII
252d01ac33
cp: fail when trying to copy to read only file on mac (#5261)
* cp: fail when trying to copy to read only file

* fix spelling error in macos.rs

* simplify permissions check

* add comment

* fix typo
2023-10-03 00:48:22 +02:00
Yury Zhytkou
c5a0aa92f8
split: implementing separator option (#5331)
* split: implementing separator option

* split: separator option - handle multiple update

* split: style

* split: separator tests

* split: separator tests - stdin in ci/cd

* split: tests - ci/cd stdin errors

* split: refactor based on feedback

* split: improve test coverage

* split: fix broken pipe error in tests with stdin

* split: fix for handle_multiple_separator_options

* split: comments

* split: refactor separator code

* split: changes based on feedback

* split: changes based on feedback
2023-10-03 00:42:46 +02:00
Daniel Hofstetter
8ee69d2b92 cp: show no "skipped" msg with -vi/-vin 2023-10-02 15:38:34 +02:00
Daniel Hofstetter
fda762b91c mv: show no "skipped" msg with -vi/-vin 2023-10-02 14:50:29 +02:00
Daniel Clarke
c27fcc4084
Update parse_datetime to 0.5.0 (#5313) 2023-10-01 18:01:46 +02:00
Sylvestre Ledru
7337cd5169 ls -R1: add a test to replicate GNU's recursive.sh 2023-10-01 17:03:57 +02:00
Daniel Hofstetter
95ccc54d05 nl: defer showing "line number overflow" error 2023-09-30 15:35:05 +02:00
Daniel Hofstetter
bc7877b58c
Merge pull request #5124 from shinhs0506/seq-parse
seq: parse "infinity" and "-infinity"
2023-09-30 06:59:32 +02:00
Daniel Hofstetter
035032cd83
Merge pull request #5158 from cakebaker/nl_section_delimiter
nl: implement -d/--section-delimiter
2023-09-29 10:42:04 +02:00
Daniel Hofstetter
51eb20a15d fmt: use clap's value parser for goal & width 2023-09-28 10:50:56 +02:00
tommady
2789885648
cp: fix cp -dR --no-preserve=links d c should have different inodes (#5320)
* fix issue 5308
2023-09-27 13:16:10 +02:00
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
Terts Diepraam
45487d47b8 extract Base enum 2023-09-25 12:02:45 +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