A3: derive the pinned command and catalog key lists in tests
Each command module keeps its own COMMAND_IDS next to its commands; the engine listing test checks their union against the registry, so a missing or extra command still fails without one shared list. The menu and palette tests derive their expectation from the listing and check grouping and ordering rules; the catalog's runtime keys are scanned from the sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
da58c83158
commit
95fd9b926f
28 changed files with 329 additions and 262 deletions
|
|
@ -80,3 +80,33 @@ pub fn register_builtins(registry: &mut Registry) -> Result<(), EngineError> {
|
|||
git_stash::register(registry)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The id lists of every module that registers built-in commands, one entry
|
||||
/// per module. Each module keeps its own list next to its commands, so new
|
||||
/// commands in different modules never touch the same lines.
|
||||
#[cfg(test)]
|
||||
pub(crate) const BUILTIN_COMMAND_IDS: &[&[&str]] = &[
|
||||
app::COMMAND_IDS,
|
||||
buffer::COMMAND_IDS,
|
||||
file::COMMAND_IDS,
|
||||
git::COMMAND_IDS,
|
||||
git_blame::COMMAND_IDS,
|
||||
git_lines::COMMAND_IDS,
|
||||
git_log::COMMAND_IDS,
|
||||
git_merge::COMMAND_IDS,
|
||||
git_remote::COMMAND_IDS,
|
||||
git_stash::COMMAND_IDS,
|
||||
goto::COMMAND_IDS,
|
||||
lsp_assist::COMMAND_IDS,
|
||||
lsp_diagnostics::COMMAND_IDS,
|
||||
lsp_nav::COMMAND_IDS,
|
||||
project::COMMAND_IDS,
|
||||
recovery::COMMAND_IDS,
|
||||
search::COMMAND_IDS,
|
||||
settings::COMMAND_IDS,
|
||||
syntax::COMMAND_IDS,
|
||||
terminal::COMMAND_IDS,
|
||||
theme::COMMAND_IDS,
|
||||
toolchain::COMMAND_IDS,
|
||||
ui::COMMAND_IDS,
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue