diff --git a/src/uu/rm/src/rm.rs b/src/uu/rm/src/rm.rs index 96ab77431..80f1c8cd9 100644 --- a/src/uu/rm/src/rm.rs +++ b/src/uu/rm/src/rm.rs @@ -29,7 +29,7 @@ enum InteractiveMode { Never, Once, Always, - Default, + PromptProtected, } struct Options { @@ -115,7 +115,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { } } } else { - InteractiveMode::Default + InteractiveMode::PromptProtected } }, one_fs: matches.contains_id(OPT_ONE_FILE_SYSTEM), diff --git a/tests/by-util/test_rm.rs b/tests/by-util/test_rm.rs index c752cc442..c5c150371 100644 --- a/tests/by-util/test_rm.rs +++ b/tests/by-util/test_rm.rs @@ -364,6 +364,7 @@ fn test_rm_directory_rights_rm1() { assert!(!at.dir_exists("b/d")); } +#[cfg(feature = "chmod")] #[test] fn test_prompt_write_protected_yes() { let scene = TestScenario::new(util_name!()); @@ -372,13 +373,13 @@ fn test_prompt_write_protected_yes() { at.touch(file_1); - #[cfg(feature = "chmod")] scene.ccmd("chmod").arg("0").arg(file_1).succeeds(); scene.ucmd().arg(file_1).pipe_in("y").succeeds(); assert!(!at.file_exists(file_1)); } +#[cfg(feature = "chmod")] #[test] fn test_prompt_write_protected_no() { let scene = TestScenario::new(util_name!()); @@ -387,7 +388,6 @@ fn test_prompt_write_protected_no() { at.touch(file_2); - #[cfg(feature = "chmod")] scene.ccmd("chmod").arg("0").arg(file_2).succeeds(); scene.ucmd().arg(file_2).pipe_in("n").succeeds();