diff --git a/clap_complete/tests/snapshots/home/dynamic/exhaustive/bash/.bashrc b/clap_complete/tests/snapshots/home/dynamic-command/exhaustive/bash/.bashrc similarity index 100% rename from clap_complete/tests/snapshots/home/dynamic/exhaustive/bash/.bashrc rename to clap_complete/tests/snapshots/home/dynamic-command/exhaustive/bash/.bashrc diff --git a/clap_complete/tests/snapshots/home/dynamic/exhaustive/elvish/elvish/rc.elv b/clap_complete/tests/snapshots/home/dynamic-command/exhaustive/elvish/elvish/rc.elv similarity index 100% rename from clap_complete/tests/snapshots/home/dynamic/exhaustive/elvish/elvish/rc.elv rename to clap_complete/tests/snapshots/home/dynamic-command/exhaustive/elvish/elvish/rc.elv diff --git a/clap_complete/tests/snapshots/home/dynamic/exhaustive/fish/fish/completions/exhaustive.fish b/clap_complete/tests/snapshots/home/dynamic-command/exhaustive/fish/fish/completions/exhaustive.fish similarity index 100% rename from clap_complete/tests/snapshots/home/dynamic/exhaustive/fish/fish/completions/exhaustive.fish rename to clap_complete/tests/snapshots/home/dynamic-command/exhaustive/fish/fish/completions/exhaustive.fish diff --git a/clap_complete/tests/snapshots/home/dynamic/exhaustive/fish/fish/config.fish b/clap_complete/tests/snapshots/home/dynamic-command/exhaustive/fish/fish/config.fish similarity index 100% rename from clap_complete/tests/snapshots/home/dynamic/exhaustive/fish/fish/config.fish rename to clap_complete/tests/snapshots/home/dynamic-command/exhaustive/fish/fish/config.fish diff --git a/clap_complete/tests/snapshots/home/dynamic/exhaustive/zsh/.zshenv b/clap_complete/tests/snapshots/home/dynamic-command/exhaustive/zsh/.zshenv similarity index 100% rename from clap_complete/tests/snapshots/home/dynamic/exhaustive/zsh/.zshenv rename to clap_complete/tests/snapshots/home/dynamic-command/exhaustive/zsh/.zshenv diff --git a/clap_complete/tests/snapshots/home/dynamic/exhaustive/zsh/zsh/_exhaustive b/clap_complete/tests/snapshots/home/dynamic-command/exhaustive/zsh/zsh/_exhaustive similarity index 100% rename from clap_complete/tests/snapshots/home/dynamic/exhaustive/zsh/zsh/_exhaustive rename to clap_complete/tests/snapshots/home/dynamic-command/exhaustive/zsh/zsh/_exhaustive diff --git a/clap_complete/tests/testsuite/bash.rs b/clap_complete/tests/testsuite/bash.rs index d39debbc4cb..16594dfa348 100644 --- a/clap_complete/tests/testsuite/bash.rs +++ b/clap_complete/tests/testsuite/bash.rs @@ -250,20 +250,20 @@ fn complete() { #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn register_dynamic_completion() { - common::register_example::("dynamic", "exhaustive"); +fn register_dynamic_command() { + common::register_example::("dynamic-command", "exhaustive"); } #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn complete_dynamic() { +fn complete_dynamic_command() { if !common::has_command("bash") { return; } let term = completest::Term::new(); let mut runtime = - common::load_runtime::("dynamic", "exhaustive"); + common::load_runtime::("dynamic-command", "exhaustive"); let input = "exhaustive \t\t"; let expected = snapbox::str![[r#" diff --git a/clap_complete/tests/testsuite/common.rs b/clap_complete/tests/testsuite/common.rs index 7ebfea6837a..b495d919a01 100644 --- a/clap_complete/tests/testsuite/common.rs +++ b/clap_complete/tests/testsuite/common.rs @@ -331,7 +331,7 @@ pub(crate) fn register_example(context: &str, nam let mut registration = std::process::Command::new(&bin_path); match context { "static" => registration.args([format!("--generate={shell_name}")]), - "dynamic" => registration.args(["complete", shell_name]), + "dynamic-command" => registration.args(["complete", shell_name]), _ => unreachable!("unsupported context {}", context), }; let registration = registration.output().unwrap(); diff --git a/clap_complete/tests/testsuite/elvish.rs b/clap_complete/tests/testsuite/elvish.rs index b953fd8bcfa..4b1e877acdb 100644 --- a/clap_complete/tests/testsuite/elvish.rs +++ b/clap_complete/tests/testsuite/elvish.rs @@ -177,20 +177,25 @@ value value #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn register_dynamic() { - common::register_example::("dynamic", "exhaustive"); +fn register_dynamic_command() { + common::register_example::( + "dynamic-command", + "exhaustive", + ); } #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn complete_dynamic() { +fn complete_dynamic_command() { if !common::has_command("elvish") { return; } let term = completest::Term::new(); - let mut runtime = - common::load_runtime::("dynamic", "exhaustive"); + let mut runtime = common::load_runtime::( + "dynamic-command", + "exhaustive", + ); let input = "exhaustive \t"; let expected = snapbox::str![[r#" diff --git a/clap_complete/tests/testsuite/fish.rs b/clap_complete/tests/testsuite/fish.rs index a4eaddab126..705b2d4922a 100644 --- a/clap_complete/tests/testsuite/fish.rs +++ b/clap_complete/tests/testsuite/fish.rs @@ -167,20 +167,20 @@ bash (bash (shell)) fish (fish shell) zsh (zsh shell)"#; #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn register_dynamic() { - common::register_example::("dynamic", "exhaustive"); +fn register_dynamic_command() { + common::register_example::("dynamic-command", "exhaustive"); } #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn complete_dynamic() { +fn complete_dynamic_command() { if !common::has_command("fish") { return; } let term = completest::Term::new(); let mut runtime = - common::load_runtime::("dynamic", "exhaustive"); + common::load_runtime::("dynamic-command", "exhaustive"); let input = "exhaustive \t\t"; let expected = snapbox::str![[r#" diff --git a/clap_complete/tests/testsuite/zsh.rs b/clap_complete/tests/testsuite/zsh.rs index d0b2f503ef0..3a3fa2cf080 100644 --- a/clap_complete/tests/testsuite/zsh.rs +++ b/clap_complete/tests/testsuite/zsh.rs @@ -165,20 +165,20 @@ pacman action alias value quote hint last -- #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn register_dynamic() { - common::register_example::("dynamic", "exhaustive"); +fn register_dynamic_command() { + common::register_example::("dynamic-command", "exhaustive"); } #[test] #[cfg(all(unix, feature = "unstable-command"))] -fn complete_dynamic() { +fn complete_dynamic_command() { if !common::has_command("zsh") { return; } let term = completest::Term::new(); let mut runtime = - common::load_runtime::("dynamic", "exhaustive"); + common::load_runtime::("dynamic-command", "exhaustive"); let input = "exhaustive \t\t"; let expected = snapbox::str![[r#"