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).
This commit is contained in:
parent
f3762d59d9
commit
492fd05ac2
1 changed files with 7 additions and 4 deletions
|
@ -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 _)
|
||||
|
|
Loading…
Add table
Reference in a new issue