mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-16 03:36:18 +00:00
Merge pull request #3027 from shoriminimoe/2986-cp
cp: only allow directory for -t
This commit is contained in:
commit
fc1fa8d1f7
3 changed files with 28 additions and 1 deletions
|
@ -183,6 +183,16 @@ fn test_cp_arg_no_target_directory() {
|
|||
.stderr_contains("cannot overwrite directory");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_target_directory_is_file() {
|
||||
new_ucmd!()
|
||||
.arg("-t")
|
||||
.arg(TEST_HOW_ARE_YOU_SOURCE)
|
||||
.arg(TEST_HELLO_WORLD_SOURCE)
|
||||
.fails()
|
||||
.stderr_contains(format!("'{}' is not a directory", TEST_HOW_ARE_YOU_SOURCE));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_arg_interactive() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue