Merge pull request #5645 from cakebaker/mv_rename_two_tests

mv: rename two tests
This commit is contained in:
Sylvestre Ledru 2023-12-13 14:59:28 +01:00 committed by GitHub
commit 60fbf1db84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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!();