diff options
| author | Craig Jennings <c@cjennings.net> | 2026-11-20 16:20:30 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-11-20 16:20:30 -0600 |
| commit | 0b3542bc1518d43b45165bd66c1fda03eeff8bcb (patch) | |
| tree | 4bcfb5c07ff1eac0c0023de44ab258bdfeae4219 /tests | |
| parent | 4df81e5e751cf50c45e1b82e694394ddcb133ada (diff) | |
| download | dotemacs-0b3542bc1518d43b45165bd66c1fda03eeff8bcb.tar.gz dotemacs-0b3542bc1518d43b45165bd66c1fda03eeff8bcb.zip | |
I'm in the terminal far more than I run tests, so it gets the easier key.
- The terminal commands move from C-; x to C-; t.
- The test runner moves from C-; t to C-; T.
- C-; x is now unbound.
- The terminal prefix gains a which-key label.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-term-tmux-history.el | 16 | ||||
| -rw-r--r-- | tests/test-test-runner.el | 14 |
2 files changed, 25 insertions, 5 deletions
diff --git a/tests/test-term-tmux-history.el b/tests/test-term-tmux-history.el index a5f5c93c..5e2bc52c 100644 --- a/tests/test-term-tmux-history.el +++ b/tests/test-term-tmux-history.el @@ -3,7 +3,7 @@ ;;; Commentary: ;; Exercises the terminal UX carried into eat-config for the EAT agent ;; terminals: the Emacs-owned tmux history buffer, the copy-mode-dwim engine -;; pick, the tmux pane-id / attached-client predicates, and the C-; x menu +;; pick, the tmux pane-id / attached-client predicates, and the C-; t menu ;; bindings. Agents run EAT over tmux, so copy-mode is tmux's own copy-mode. ;; ;; eat is required (so eat-config's `with-eval-after-load' fires for the C-<up> @@ -263,10 +263,16 @@ up-arrow -- it does not re-enter and reset the cursor." ;;; bindings (ert-deftest test-term-keymap-history-and-copy-bindings () - "Normal: the C-; x terminal map owns the tmux-history and copy-mode commands." - (should (eq (keymap-lookup cj/custom-keymap "x h") #'cj/term-tmux-history)) - (should (eq (keymap-lookup cj/custom-keymap "x c") #'cj/term-copy-mode-dwim)) - (should (eq (keymap-lookup cj/custom-keymap "x t") #'cj/term-toggle))) + "Normal: the C-; t terminal map owns the tmux-history and copy-mode commands." + (should (eq (keymap-lookup cj/custom-keymap "t") cj/term-map)) + (should (eq (keymap-lookup cj/custom-keymap "t h") #'cj/term-tmux-history)) + (should (eq (keymap-lookup cj/custom-keymap "t c") #'cj/term-copy-mode-dwim)) + (should (eq (keymap-lookup cj/custom-keymap "t d") #'cj/term-tmux-detach)) + (should (eq (keymap-lookup cj/custom-keymap "t t") #'cj/term-toggle))) + +(ert-deftest test-term-keymap-old-x-prefix-is-gone () + "Boundary: the terminal map no longer answers on its old C-; x prefix." + (should-not (eq (keymap-lookup cj/custom-keymap "x") cj/term-map))) (ert-deftest test-term-copy-mode-up-bound-in-eat-semi-char-map () "Normal: C-<up> enters copy-mode + scrolls up from inside an EAT terminal." diff --git a/tests/test-test-runner.el b/tests/test-test-runner.el index 6854b72e..c5416352 100644 --- a/tests/test-test-runner.el +++ b/tests/test-test-runner.el @@ -497,5 +497,19 @@ comparing against the directory with a trailing slash rejects it." (ert-delete-test 'test-testrunner-project-names-b)))) (test-testrunner-teardown)) +;;; bindings + +(ert-deftest test-testrunner-prefix-is-capital-t () + "Normal: the test runner map sits on C-; T with its commands under it." + (should (eq (keymap-lookup cj/custom-keymap "T") cj/testrunner-map)) + (should (eq (keymap-lookup cj/custom-keymap "T r") #'cj/test-run-smart)) + (should (eq (keymap-lookup cj/custom-keymap "T R") #'cj/test-run-all)) + (should (eq (keymap-lookup cj/custom-keymap "T .") #'cj/run-test-at-point)) + (should (eq (keymap-lookup cj/custom-keymap "T t") #'cj/test-toggle-mode))) + +(ert-deftest test-testrunner-lowercase-t-prefix-is-released () + "Boundary: the test runner no longer claims C-; t, which the terminal owns." + (should-not (eq (keymap-lookup cj/custom-keymap "t") cj/testrunner-map))) + (provide 'test-test-runner) ;;; test-test-runner.el ends here |
