Commit graph

2789 commits

Author SHA1 Message Date
Nathan Houghton
dbfd700502 test: use mtime for -ot and fix direction of comparison
- Use the file modification time instead of the creation time (matches
  GNU coreutils documentation)

- Fix direction of comparison (a < b instead of a > b)

- Extend test case to cover both the 0 and 1 exit code cases
2023-10-22 17:44:40 -07:00
Sylvestre Ledru
03d598d08b
Merge pull request #5430 from cakebaker/cp_remove_destination_shouldnt_fail
cp --remove-destination: don't fail if destination is symlink to source
2023-10-22 22:17:32 +02:00
Daniel Hofstetter
772892e2e4 cp: --rem don't fail if dest is symlink to source 2023-10-20 09:41:30 +02:00
Yury Zhytkou
eede467e21
split : --filter and stdin updates (#5418) 2023-10-20 08:47:32 +02:00
Sylvestre Ledru
f971a69d69
ls --dired -R: fix the positions (#5341)
* move get_offset_from_previous_line into a specific function

* dired: improve the -R support

* dired: fix the display with subdir

* ls --dired -R: fix the positions

* ls --dired -R: verify also the SUBDIRED coordinate

* ls --dired -R: add a long file name and fix a windows test

* dired: always put dired first in the args + minor fixes

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* ls: add cognitive_complexity to silent a warning

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-19 14:17:34 +02:00
Daniel Hofstetter
a3c6d6d91e
Merge pull request #5423 from Luv-Ray/fix-pathchk-issue5314
`pathchk`: check empty path by default
2023-10-19 09:33:42 +02:00
Zhuoxun Yang
4424091592 tests/pathchk: check error message 2023-10-19 01:29:53 +08:00
Sylvestre Ledru
4573eb693f
Merge pull request #5357 from zhitkoff/issue5334-uucore-parse-r-q
Implement SI prefixes R and Q
2023-10-18 18:55:17 +02:00
Zhuoxun Yang
f63f9a06f6 tests/pathchk: test empty path 2023-10-18 22:50:54 +08:00
zhitkoff
7038657a44 implement R and Q prefixes 2023-10-17 10:50:50 -04:00
zhitkoff
cb7479e823 uucore: implement SI suffixes R and Q 2023-10-17 10:50:50 -04:00
Zhuoxun Yang
04ab5b0108 tests/expr: add tests for "" 2023-10-17 22:26:19 +08:00
Zhuoxun Yang
7421c81a22 tests/expr: sort test cases 2023-10-17 22:21:44 +08:00
Daniel Hofstetter
541ac6a813
Merge pull request #5403 from sylvestre/rm
rm: In some cases, remove_dir is doing a better job than remove_dir_all
2023-10-16 09:35:44 +02:00
Luv_Ray
46b8b41e3f
Merge branch 'main' into fix-expr-syntex-error 2023-10-14 23:50:21 +08:00
Zhuoxun Yang
5b1755387f tests/expr: test escape 2023-10-14 23:18:15 +08:00
Daniel Hofstetter
f6880bff8f expr: test some invalid syntaxes 2023-10-14 14:58:41 +02:00
Sylvestre Ledru
505ef714b9 rm: In some cases, remove_dir is doing a better job than remove_dir_all
use it when remove_dir_all failed

GNU compatibility (rm/empty-inacc.sh)
2023-10-14 12:09:27 +02:00
Zhuoxun Yang
40f05a331e tests/expr: add tests for test_and 2023-10-14 01:58:53 +08:00
Sylvestre Ledru
41188a915e
rename the test
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-13 11:35:45 +02:00
Sylvestre Ledru
94972d45c7 ls: Document a bit tests/ls/stat-dtype.sh 2023-10-12 23:37:07 +02:00
zhitkoff
a920464952 split: undocumented options aliases + help fix 2023-10-11 12:13:22 -04:00
Daniel Hofstetter
94f5fa9487
Merge pull request #5365 from Luv-Ray/fix-expr
`expr`: short-circuit evaluation for `|`
2023-10-08 14:55:59 +02:00
Zhuoxun Yang
e5d70d444a tests/expr: format 2023-10-07 10:41:10 +08:00
Sylvestre Ledru
a596cda516
Merge pull request #5355 from boxdot/main
relpath: remove
2023-10-06 20:39:25 +02:00
Luv_Ray
7bf4b7f674
tests/expr: add tests in test_expr.rs 2023-10-07 00:42:04 +08:00
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
boxdot
e88183174b
relpath: remove
Closes #5236
2023-10-04 16:13:06 +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