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:
Sylvestre Ledru 2020-11-25 13:41:46 +01:00
parent adc9b12f32
commit 63bf6cc599

View file

@ -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!();