1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

refactor(rm): Move to clap + add a test

This commit is contained in:
Sylvestre Ledru 2020-11-08 23:26:42 +01:00
parent f47005e999
commit 61520546a5
4 changed files with 135 additions and 72 deletions

View file

@ -12,6 +12,14 @@ fn test_rm_one_file() {
assert!(!at.file_exists(file));
}
#[test]
fn test_rm_failed() {
let (_at, mut ucmd) = at_and_ucmd!();
let file = "test_rm_one_file";
ucmd.arg(file).fails(); // Doesn't exist
}
#[test]
fn test_rm_multiple_files() {
let (at, mut ucmd) = at_and_ucmd!();