Commit graph

91 commits

Author SHA1 Message Date
mhead
2c528cfcb5 mv: fix error message when one of the multiple src doesn't exist 2024-11-01 13:35:47 +05:30
David Campbell
353eb53367
Fix clippy::uninlined_format_args . 2024-09-19 17:56:27 -04:00
sreehari prasad
8a9fb84a8e
mv: gnu test case mv-n compatibility (#6599)
* uucore: add update control `none-fail`

* uucore: show suggestion when parse errors occurs because of an ambiguous value

* added tests for fail-none and ambiguous parse error

* uucore: ambiguous value code refractor

* cp: no-clobber fail silently and outputs skipped message in debug

* mv: add --debug support

* minor changes

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2024-09-14 09:11:17 +02:00
sreehari prasad
5baf382f7e
mv: use read_to_string and write when testing inter-partition copying (#6583)
* mv: inter partition copying test code cleanup

* mv: inter partition copying use of read_to_string and write

* Update tests/by-util/test_mv.rs

Co-authored-by: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>

---------

Co-authored-by: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
2024-07-19 19:03:20 +02:00
Ben Wiederhake
42b3baf32f clippy: simplify code according to nightly 'needless_borrows_for_generic_args' lint
https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrows_for_generic_args
2024-07-18 15:59:36 +02:00
mhead
84f8b7a98b proper error message when inter-partition copying fails with test 2024-07-18 13:11:34 +02:00
mhead
ff12e6ee87 mv: gnu test case to-symlink fix 2024-07-18 13:11:34 +02:00
Jadi
9303f8e5b1 Disabling compare_xattrs cp and mv related tests on OpenBSD
The test_cp and test_mv have xattr related tests. They should
be disabled on OpenBSD after commit 19d42c0339 disabled the
compare_xattrs function on OpenBSD.

Fixes #6348
2024-05-09 18:24:39 +02:00
Sylvestre Ledru
dcfb03aad6 Fix clippy warnings 2024-03-09 22:31:33 +01:00
Sylvestre Ledru
2ec4e9f784 mv: preserve the xattr
Should make tests/mv/acl pass
2024-01-16 13:12:02 +01:00
Sylvestre Ledru
4c698d58e0 mv: support the case mkdir a && mv a e/ 2024-01-05 12:56:24 +01:00
Sylvestre Ledru
db9f4cc315
Merge pull request #5483 from cakebaker/mv_fix_5481
mv: fix subdir detection
2023-12-25 22:02:23 +01:00
Daniel Hofstetter
03f1b8aa3a mv: fix subdir detection 2023-12-25 13:12:18 +01:00
Sylvestre Ledru
15573579cc Fix the windows tests 2023-12-24 15:18:31 +01:00
Sylvestre Ledru
c94773f522 mv: make sure it continues when hiting an error 2023-12-23 13:27:00 +01:00
Sylvestre Ledru
3af8ad0fe6 mv: manages the 'seen' file list before moving
Should help with tests/mv/childproof.sh
2023-12-23 13:07:39 +01:00
Daniel Hofstetter
1c6317af76 mv: allow dest with slash when using --update 2023-12-22 17:03:59 +01:00
Daniel Hofstetter
6fb3bbb8a0 mv: rename two tests 2023-12-13 14:27:19 +01:00
Daniel Hofstetter
8e796d3bb6 mv: fix issue with -T and dest ending with "/" 2023-11-19 15:10:28 +01: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
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
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
fda762b91c mv: show no "skipped" msg with -vi/-vin 2023-10-02 14:50:29 +02:00
Sylvestre Ledru
0b9c829bce
Merge pull request #5182 from sylvestre/clippy_
Fix some of the recent clippy warnings
2023-08-21 16:21:02 -04:00
Sylvestre Ledru
bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Sylvestre Ledru
7c9f4ba92a Fix some clippy warnings 2023-08-21 08:41:40 +02:00
Sylvestre Ledru
40c598852b mv: add the check with --b=simple and when the source is a backup 2023-06-28 23:11:28 +02:00
Rayhan Faizel
269ffc12b4 tests/mv: add tests to check for copying symlinks onto hardlinks to symlink 2023-06-12 23:49:28 +05:30
Rayhan Faizel
6bc15aac99 tests/mv: Test for particular edge cases when handling symlink files 2023-06-10 18:32:41 +05:30
Sylvestre Ledru
d38797bb50 mv: Show 'skipped' when a file isn't overwriten
Should fix tests/mv/mv-n.sh
2023-05-29 21:57:42 +02:00
Daniel Hofstetter
2f4b57ca97 mv: add missing semicolons to tests 2023-05-23 07:23:42 +02:00
Daniel Hofstetter
d769871374
Merge pull request #4831 from sylvestre/mv-hardlink
mv: 'mv source hardlink' should fail
2023-05-08 16:12:23 +02:00
Sylvestre Ledru
48b8cfa595 mv: adjust the tests - duplicate code + android
According to:
https://stackoverflow.com/questions/44913985/creating-hardlinks-and-symlinks-in-android
hardlink aren't expected to work on android + fat
2023-05-08 15:24:47 +02:00
Sylvestre Ledru
594f81a88a mv --backup=simple a b on hard links should not fail
touch a
ln a b
./target/debug/coreutils mv --backup=simple a b

GNU: tests/mv/hard-4.sh
2023-05-08 13:08:20 +02:00
Sylvestre Ledru
a5a39b6ba8 mv: 'mv source hardlink' should fail
fixes: tests/mv/force.sh
2023-05-07 23:08:41 +02:00
Sylvestre Ledru
b94d10f080 Fix some semicolon_if_nothing_returned 2023-05-06 19:35:44 +02:00
Daniel Hofstetter
93c8623da9 mv: if more than one of -i, -n, -f, latest "wins" 2023-05-05 15:17:37 +02:00
Daniel Hofstetter
4ee1118061
Merge pull request #4823 from shinhs0506/mv-i-dir-file
fix tests/mv/i-5.sh
2023-05-04 13:43:05 +02:00
John Shin
84567336a8 mv: update test case so it doesn't fail 2023-05-03 23:54:28 -07:00
Daniel Hofstetter
616a166e36
Merge pull request #4820 from sylvestre/thru-dangling-2
cp: fix cp -f f loop when loop is a symlink loop
2023-05-04 08:20:57 +02:00
John Shin
1c8aac0883 mv: return err if response is negative when moving a dir to existing dest during an interactive mode 2023-05-03 16:05:21 -07:00
Daniel Hofstetter
923a62c6be
mv: fix function/file names in tests 2023-05-03 10:07:46 +02:00
Sylvestre Ledru
aae3f2f99c Ride along: fix some trivial clippy warnings 2023-05-02 23:22:39 +02:00
John Shin
8ad2fa3cc1 mv: write test for multiple update args 2023-05-02 13:46:43 -07:00
John Shin
6a100976c7 mv: simplify tests for update 2023-05-02 13:30:38 -07:00
John Shin
85ded232bc mv: resolve merge conflict 2023-04-30 20:09:32 -07:00
John Shin
78412c5a61 mv: add tests for --update 2023-04-30 19:29:49 -07:00
Sylvestre Ledru
c5fb6eac9f
Merge pull request #4794 from shinhs0506/mv-target-dir
mv: check if --target is a directory
2023-04-29 10:40:44 +02:00
John Shin
a93bccb5b9 mv: add tests for --target 2023-04-28 03:10:10 -07:00
Sylvestre Ledru
360cbda0c5
Merge pull request #4782 from cakebaker/mv_no_clobber_behavior_change
mv: adapt -n behavior to GNU mv 9.3
2023-04-26 22:47:12 +02:00