1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-18 03:01:06 +00:00
uutils-coreutils/tests
Solomon 98c9be5ec4
mv: improve move-to-self error handling (#6995)
- improve move-to-self detection, so this errors without data loss:

```diff
 mkdir mydir
 mv mydir mydir/subdir
-mv: No such file or directory (os error 2)
+mv: cannot move 'mydir' to a subdirectory of itself, 'mydir/subdir'
```

- align "cannot move source to a subdirectory of itself" and "same file"
  errors more closely with coreutils:

```diff
 mkdir mydir
 mv mydir/ mydir/..
-mv: cannot move 'mydir/' to a subdirectory of itself, 'mydir/../mydir/'
+mv: 'mydir/' and 'mydir/../mydir' are the same file
```

Causing: https://github.com/nushell/nushell/issues/13082
2024-12-26 20:48:29 +01:00
..
benches/factor num-prime => '0.4.4' 2024-10-15 22:46:44 +02:00
by-util mv: improve move-to-self error handling (#6995) 2024-12-26 20:48:29 +01:00
common clippy: it is more idiomatic to use 'Option<&T>' instead of '&Option<T>' 2024-11-29 08:36:54 +01:00
fixtures sort: adapt fixtures to change in unicode-width 2024-12-09 09:20:19 +01:00
test_util_name.rs tests: fix some clippy warnings 2024-05-25 09:06:16 +02:00
tests.rs relpath: remove 2023-10-04 16:13:06 +02:00