Commit Graph

2818 Commits

Author SHA1 Message Date
Terts Diepraam 1cae4981e6 Merge pull request #5508 from cakebaker/cp_fix_test_closes_file_descriptors
cp: make test_closes_file_descriptors Linux-only
2023-11-09 09:45:16 +01:00
Zhuoxun Yang fb414ed917 tests/printf: support %q 2023-11-09 10:18:27 +08:00
Daniel Hofstetter 761213f1d2 cp: make test_closes_file_descriptors Linux-only 2023-11-08 09:33:49 +01:00
Daniel Hofstetter 7afb8461cb du: add -H (alias for --dereference-args) 2023-11-07 10:30:54 +01:00
Sylvestre Ledru 1818632d7c Merge pull request #5496 from cakebaker/cp_tail_fix_warnings_in_tests
cp,tail: fix warnings in tests on Android
2023-11-06 07:51:32 +01:00
Daniel Hofstetter bbdde2890a du: ignore test under Android & FreeBSD 2023-11-05 14:27:20 +01:00
Daniel Hofstetter 91b19b7c56 cp,tail: fix warnings in tests on Android 2023-11-05 13:56:39 +01:00
Daniel Hofstetter 29f6631554 du: add -P/--no-dereference 2023-11-03 17:17:44 +01:00
zhitkoff 62887c7a58 split: directory separator in additional suffix 2023-11-02 17:17:38 +01:00
zhitkoff f05474a33a split: slash separator 2023-11-02 17:17:38 +01:00
zhitkoff fbb454a080 split: suffix auto-widening and auto-width tests 2023-11-02 17:17:38 +01:00
Terts Diepraam 98ad01b1cc Merge pull request #5471 from cakebaker/cp_fix_unused_variable_warnings
cp: restrict two test functions to linux/mac/win
2023-11-01 09:11:38 +01:00
tommady a4775d288b cp: fix cp -rT dir dir2 leads to different result than with GNU cp (#5467)
* add a test case test_cp_treat_dest_as_a_normal_file

* fix 5457

* cp: fix comment

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-30 17:55:03 +01:00
Daniel Hofstetter a7cc3b6dca cp: restrict two test functions to linux/mac/win 2023-10-29 14:37:47 +01:00
Sylvestre Ledru c24a51403a cat: return the same error message as GNU with loop symlink (#5466)
* cat: return the same error message as GNU with loop symlink

Should fix tests/du/long-sloop.sh because it is using cat as a ref
for error messages

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-28 22:29:24 +02:00
Mick van Gelderen 5c100dd088 mv: Fix stderr output mv file into dir and dir into file where both are files (#5464)
* Add tests mv file into dir and dir into file where both are files

* Fix test_mv_dir_into_file_where_both_are_files

* Fix test_mv_file_into_dir_where_both_are_files

* Store String in error instead of PathBuf

* Implement path_ends_with_terminator for windows

* Fix compilation on windows
2023-10-28 15:04:51 +02:00
Daniel Hofstetter 9f5db29145 cp: add test for --attributes-only 2023-10-27 09:34:31 +02:00
Daniel Hofstetter 6085cf12e3 Merge pull request #5353 from tommady/fix-5327
cp: fix cp -a --no-preserve=mode doesn't keep fully the mode
2023-10-25 13:34:45 +02:00
Terts Diepraam 96d0830952 Merge pull request #5446 from cakebaker/ls_try_get_matches_from
ls: use try_get_matches_from instead of get_matches_from
2023-10-25 11:25:40 +02:00
Daniel Hofstetter 9df50096c8 cp: remove "all" from cfg; rename test fn 2023-10-25 10:15:46 +02:00
Nathan Houghton db26dabd6e tests/dd: Do not use the OS provided dd utility on FIFOs
On *BSD and macOS, the system provided dd utility opens up the output
file for both reading and writing. This means that the open/write to the
FIFO does not block, and almost instantly completes. The system dd then
exits, leaving nothing left to be read by the time the coreutils-rs dd
tries to open/read the FIFO.

Avoid this problem by just writing to the FIFO from the test case
itself, rather than relying on the system provide dd.
2023-10-25 00:05:56 -07:00
Daniel Hofstetter 6f84e56e28 ls: return exit code 2 for invalid time-style 2023-10-24 16:33:04 +02:00
Daniel Hofstetter fd18d2686f ls: return exit code 2 for -l --dired --zero 2023-10-24 14:48:24 +02:00
David Matos 769eb29cd3 mv: moving directory itself should fail (#5429)
* mv: moving directory itself should fail

* mv: Check trailing slash also fails on target containing itself

* mv: add "spell-checker:ignore mydir" to test

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-24 10:54:23 +02:00
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