aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-term-tmux-history.el16
-rw-r--r--tests/test-test-runner.el14
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