mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00: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:
parent
adc9b12f32
commit
63bf6cc599
1 changed files with 13 additions and 0 deletions
|
@ -31,6 +31,19 @@ fn test_install_basic() {
|
||||||
assert!(at.file_exists(&format!("{}/{}", dir, file2)));
|
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]
|
#[test]
|
||||||
fn test_install_failing_not_dir() {
|
fn test_install_failing_not_dir() {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue