mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Implement basic installation of file to directory
Bare minimum functionality of `install file dir` implemented. Also added TODO markers in code for outstanding parameters and split main function into smaller logical chunks.
This commit is contained in:
parent
e72ec4a5bb
commit
8a5719561d
2 changed files with 202 additions and 38 deletions
|
@ -19,3 +19,20 @@ fn test_install_help() {
|
|||
|
||||
// assert!(result.stdout.contains("Usage:"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_install_basic() {
|
||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||
let dir = "test_install_target_dir_dir";
|
||||
let file = "test_install_target_dir_file_a";
|
||||
|
||||
at.touch(file);
|
||||
at.mkdir(dir);
|
||||
let result = ucmd.arg(file).arg(dir).run();
|
||||
|
||||
assert_empty_stderr!(result);
|
||||
assert!(result.success);
|
||||
|
||||
assert!(!at.file_exists(file));
|
||||
assert!(at.file_exists(&format!("{}/{}", dir, file)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue