Commit 6e52c88
committed
test(binds): add extensive normalize_binds unit tests (68 cases)
Covers all normalize_binds scenarios per the unified-binds-design spec:
- key normalization: neovim format, fzf format, shift+letter uppercase,
neovim-only keys (ctrl-enter, alt-esc), function keys, alt keys
- value normalization: strings (fzf action, builtin), functions
(actions/exec_silent accept), tables with fn (metadata preservation),
string [1] (help format), function arrays (chain), backward compat
{fn, actions.resume} reload, false/nil/true removal
- merge precedence: binds > actions > keymap.fzf > keymap.builtin,
across all combinations
- unbind: removes from merged, clears opts.actions and opts.keymap.fzf
- source tracking: _source and _nvim_key for all 4 sources
- empty/missing tables: graceful handling
- internal actions: underscore prefix excluded
- fzf events: event=true for load/start/resize/change/focus/result
- complex scenarios: mixed sources, cross-layer unbind, direct/accept/transform1 parent b5418ae commit 6e52c88
1 file changed
Lines changed: 561 additions & 0 deletions
0 commit comments