mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
chore: add non-regression tests for cp arg count
This commit is contained in:
parent
5b1d4d9bdc
commit
399384062d
1 changed files with 17 additions and 0 deletions
|
@ -5751,3 +5751,20 @@ fn test_cp_with_options_backup_and_rem_when_dest_is_symlink() {
|
|||
assert!(!at.symlink_exists("inner_dir/sl"));
|
||||
assert_eq!(at.read("inner_dir/sl"), "xyz");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_single_file() {
|
||||
let (_at, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.arg(TEST_HELLO_WORLD_SOURCE)
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("missing destination file");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_no_file() {
|
||||
let (_at, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("error: the following required arguments were not provided:");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue