summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r--cli/args/flags.rs24
1 files changed, 22 insertions, 2 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs
index f3ba85e45..bae6bb0d5 100644
--- a/cli/args/flags.rs
+++ b/cli/args/flags.rs
@@ -1312,8 +1312,7 @@ fn uninstall_subcommand<'a>() -> Command<'a> {
.arg(
Arg::new("name")
.required(true)
- .multiple_occurrences(false)
- .allow_hyphen_values(true))
+ .multiple_occurrences(false))
.arg(
Arg::new("root")
.long("root")
@@ -5005,6 +5004,27 @@ mod tests {
}
#[test]
+ fn uninstall() {
+ let r = flags_from_vec(svec!["deno", "uninstall", "file_server"]);
+ assert_eq!(
+ r.unwrap(),
+ Flags {
+ subcommand: DenoSubcommand::Uninstall(UninstallFlags {
+ name: "file_server".to_string(),
+ root: None,
+ }),
+ ..Flags::default()
+ }
+ );
+ }
+
+ #[test]
+ fn uninstall_with_help_flag() {
+ let r = flags_from_vec(svec!["deno", "uninstall", "--help"]);
+ assert_eq!(r.err().unwrap().kind(), clap::ErrorKind::DisplayHelp);
+ }
+
+ #[test]
fn log_level() {
let r =
flags_from_vec(svec!["deno", "run", "--log-level=debug", "script.ts"]);