diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 12:19:17 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 12:19:17 -0500 |
| commit | a7cc492131361195ad08d433c64c7c76b255bc8c (patch) | |
| tree | fa6cc368494c248ac97d783d2b0171a4ebf42ce8 /modules/selection-framework.el | |
| parent | 3003683a24cf38dbd2eeeaee6244ad0c1bbe72ee (diff) | |
| download | dotemacs-a7cc492131361195ad08d433c64c7c76b255bc8c.tar.gz dotemacs-a7cc492131361195ad08d433c64c7c76b255bc8c.zip | |
test(vterm): cover the copy-mode exit chain end-to-end
The unit tests for the cursor-restoration hook only exercised the helper in isolation. The real integration -- toggling the minor mode and watching the hook fire as part of the chain -- wasn't covered. If `vterm-copy-mode-done' or `cj/vterm-copy-mode-cancel' broke their exit semantics (or our hook stopped firing on `vterm-copy-mode-hook'), the unit tests would still pass but the cursor would stay stuck on the bar in real use.
Add five integration tests that toggle the actual minor mode through stubbed `vterm--enter-copy-mode' / `vterm--exit-copy-mode' (so we don't need a live vterm process) and assert the cursor moves through the full lifecycle: nil -> bar on enter, bar -> killed-local on exit. Cover all three exit paths Craig hits in normal use:
- vterm-copy-mode -1 directly (the toggle)
- vterm-copy-mode-done with an active region (M-w / RET)
- vterm-copy-mode-done with no region (line-selection branch)
- cj/vterm-copy-mode-cancel (C-g / <escape>)
Plus a multi-cycle test so a regression in `kill-local-variable' handling shows up.
Diffstat (limited to 'modules/selection-framework.el')
0 files changed, 0 insertions, 0 deletions
