* 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>
* 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>
* 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
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.
* 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>
- 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
* 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>