mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Add a test to verify that install can be used just to copy a simple file
example: touch bar.txt && ./target/debug/coreutils install bar.txt foo.txt
This commit is contained in:
@@ -31,6 +31,19 @@ fn test_install_basic() {
|
||||
assert!(at.file_exists(&format!("{}/{}", dir, file2)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_install_copy_file() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let file1 = "test_install_target_dir_file_a1";
|
||||
let file2 = "test_install_target_dir_file_a2";
|
||||
|
||||
at.touch(file1);
|
||||
ucmd.arg(file1).arg(file2).succeeds().no_stderr();
|
||||
|
||||
assert!(at.file_exists(file1));
|
||||
assert!(at.file_exists(file2));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_install_failing_not_dir() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
Reference in New Issue
Block a user