1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #1632 from sylvestre/clap-rm

refactor(rm): Move to clap + add a test
This commit is contained in:
Sylvestre Ledru 2020-11-17 13:00:35 +01:00 committed by GitHub
commit 5eaab5327c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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!();