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

mv: rename two tests

This commit is contained in:
Daniel Hofstetter 2023-12-13 14:27:19 +01:00
parent 818719e62c
commit 6fb3bbb8a0

View file

@ -10,10 +10,20 @@ use std::thread::sleep;
use std::time::Duration;
#[test]
fn test_invalid_arg() {
fn test_mv_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
fn test_mv_missing_dest() {
let (at, mut ucmd) = at_and_ucmd!();
let dir = "dir";
at.mkdir(dir);
ucmd.arg(dir).fails();
}
#[test]
fn test_mv_rename_dir() {
let (at, mut ucmd) = at_and_ucmd!();
@ -27,16 +37,6 @@ fn test_mv_rename_dir() {
assert!(at.dir_exists(dir2));
}
#[test]
fn test_mv_fail() {
let (at, mut ucmd) = at_and_ucmd!();
let dir1 = "test_mv_rename_dir";
at.mkdir(dir1);
ucmd.arg(dir1).fails();
}
#[test]
fn test_mv_rename_file() {
let (at, mut ucmd) = at_and_ucmd!();