summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/selection-framework.el3
-rw-r--r--tests/test-selection-framework-keybindings.el30
2 files changed, 30 insertions, 3 deletions
diff --git a/modules/selection-framework.el b/modules/selection-framework.el
index 5ace0a5f..1129ac05 100644
--- a/modules/selection-framework.el
+++ b/modules/selection-framework.el
@@ -127,9 +127,6 @@
;; Use Consult for completion-at-point
(setq completion-in-region-function #'consult-completion-in-region))
-;; Override default search with consult-line
-(keymap-global-set "C-s" #'consult-line)
-
;; Consult integration with Embark
(use-package embark-consult
:after (embark consult)
diff --git a/tests/test-selection-framework-keybindings.el b/tests/test-selection-framework-keybindings.el
new file mode 100644
index 00000000..8fb8b3df
--- /dev/null
+++ b/tests/test-selection-framework-keybindings.el
@@ -0,0 +1,30 @@
+;;; test-selection-framework-keybindings.el --- Tests for selection framework keys -*- lexical-binding: t; -*-
+
+;;; Commentary:
+;; Smoke coverage for the final search binding owned by selection-framework.el.
+
+;;; Code:
+
+(require 'ert)
+
+(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
+
+(defmacro use-package (&rest _args)
+ "Ignore package configuration while loading selection-framework in tests."
+ nil)
+
+(defun consult-line (&rest _args)
+ "Test stub for `consult-line'.")
+
+(defun vertico-repeat (&rest _args)
+ "Test stub for `vertico-repeat'.")
+
+(require 'selection-framework)
+
+(ert-deftest test-selection-framework-c-s-runs-consult-line-or-repeat ()
+ "C-s should resolve to the final consult-line-or-repeat command."
+ (should (eq (key-binding (kbd "C-s"))
+ #'cj/consult-line-or-repeat)))
+
+(provide 'test-selection-framework-keybindings)
+;;; test-selection-framework-keybindings.el ends here