mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
cp: make --backup and --no-clobber are mutually exclusive (#7082)
* cp: make --backup and --no-clobber are mutually exclusive Should fix tests/cp/cp-i.sh * simplify the test Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com> --------- Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
parent
7a78213edb
commit
934e85f4cd
2 changed files with 21 additions and 0 deletions
|
@ -2422,6 +2422,17 @@ fn test_cp_reflink_bad() {
|
|||
.stderr_contains("error: invalid value 'bad' for '--reflink[=<WHEN>]'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_conflicting_update() {
|
||||
new_ucmd!()
|
||||
.arg("-b")
|
||||
.arg("--update=none")
|
||||
.arg("a")
|
||||
.arg("b")
|
||||
.fails()
|
||||
.stderr_contains("--backup is mutually exclusive with -n or --update=none-fail");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
fn test_cp_reflink_insufficient_permission() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue