summaryrefslogtreecommitdiff
path: root/test/lisp/erc/erc-tests.el
diff options
context:
space:
mode:
authorF. Jason Park <jp@neverwas.me>2021-09-16 15:20:59 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-09-16 15:20:59 +0200
commit492fd05ac21f10efc82a93eed23bdd4532bbb0b1 (patch)
tree98f6dc046c89810bd793a97b6c82dbd719a81e1b /test/lisp/erc/erc-tests.el
parentf3762d59d92c832f8417e8eeadc49c19d1c367bb (diff)
downloademacs-492fd05ac21f10efc82a93eed23bdd4532bbb0b1.tar.gz
emacs-492fd05ac21f10efc82a93eed23bdd4532bbb0b1.tar.bz2
emacs-492fd05ac21f10efc82a93eed23bdd4532bbb0b1.zip
Fix mistake in test for erc-ring-previous-command
* test/lisp/erc/erc-tests.el (erc-ring-previous-command): The variable erc-send-completed-hook was previously set to nil permanently, which would affect other tests (bug#50005).
Diffstat (limited to 'test/lisp/erc/erc-tests.el')
-rw-r--r--test/lisp/erc/erc-tests.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index d13397274aa..9efcf4a7038 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -61,13 +61,16 @@
(with-current-buffer (get-buffer-create "*#fake*")
(erc-mode)
(insert "\n\n")
- (setq erc-input-marker (make-marker) ; these are all local
- erc-insert-marker (make-marker)
- erc-send-completed-hook nil)
+ (should-not (local-variable-if-set-p 'erc-send-completed-hook))
+ (set (make-local-variable 'erc-send-completed-hook) nil) ; skip t (globals)
+ (setq erc-input-marker (make-marker)
+ erc-insert-marker (make-marker))
(set-marker erc-insert-marker (point-max))
(erc-display-prompt)
(should (= (point) erc-input-marker))
- (add-hook 'erc-pre-send-functions #'erc-add-to-input-ring nil t)
+ ;; Just in case erc-ring-mode is already on
+ (setq-local erc-pre-send-functions nil)
+ (add-hook 'erc-pre-send-functions #'erc-add-to-input-ring)
;;
(cl-letf (((symbol-function 'erc-process-input-line)
(lambda (&rest _)