mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-12 09:28:24 +00:00
* test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys.
(dabbrev-expand-test, dabbrev-completion-test) (dabbrev-completion-test-with-argument): Use 'kbd' to format keys for 'execute-kbd-macro'. (dabbrev-expand-test): Fix docstring.
This commit is contained in:
parent
1cdb4d2077
commit
2841e26744
@ -29,16 +29,15 @@
|
||||
|
||||
(ert-deftest dabbrev-expand-test ()
|
||||
"Test for bug#1948.
|
||||
When DABBREV-ELIMINATE-NEWLINES is non-nil (the default),
|
||||
repeated calls to DABBREV-EXPAND can result in the source of
|
||||
When `dabbrev-eliminate-newlines' is non-nil (the default),
|
||||
repeated calls to `dabbrev-expand' can result in the source of
|
||||
first expansion being replaced rather than the destination."
|
||||
(with-temp-buffer
|
||||
(insert "ab x\na\nab y")
|
||||
(goto-char 8)
|
||||
(save-window-excursion
|
||||
(set-window-buffer nil (current-buffer))
|
||||
;; M-/ SPC M-/ M-/
|
||||
(execute-kbd-macro "\257 \257\257"))
|
||||
(execute-kbd-macro (kbd "M-/ SPC M-/ M-/")))
|
||||
(should (string= (buffer-string) "ab x\nab y\nab y"))))
|
||||
|
||||
(ert-deftest dabbrev-completion-test ()
|
||||
@ -52,8 +51,7 @@ buffers unless a prefix argument is used."
|
||||
(goto-char 6)
|
||||
(save-window-excursion
|
||||
(set-window-buffer nil (current-buffer))
|
||||
;; C-M-/
|
||||
(execute-kbd-macro [201326639]))
|
||||
(execute-kbd-macro (kbd "C-M-/")))
|
||||
(should (string= (buffer-string) "abc\nabc")))))
|
||||
|
||||
(ert-deftest dabbrev-completion-test-with-argument ()
|
||||
@ -67,8 +65,7 @@ multiple expansions."
|
||||
(goto-char 6)
|
||||
(save-window-excursion
|
||||
(set-window-buffer nil (current-buffer))
|
||||
;; C-u C-u C-M-/
|
||||
(execute-kbd-macro [21 21 201326639]))
|
||||
(execute-kbd-macro (kbd "C-u C-u C-M-/")))
|
||||
(should (string= (buffer-string) "abc\na")))))
|
||||
|
||||
;;; dabbrev-tests.el ends here
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'ert-x) ;For `ert-run-keys'.
|
||||
(require 'ert-x) ;For `ert-simulate-keys'.
|
||||
(require 'find-func)
|
||||
|
||||
(ert-deftest find-func-tests--library-completion () ;bug#43393
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'ert-x) ;For `ert-run-keys'.
|
||||
(require 'ert-x) ;For `ert-simulate-keys'.
|
||||
|
||||
(ert-deftest find-auto-coding--bug27391 ()
|
||||
"Check that Bug#27391 is fixed."
|
||||
|
Loading…
Reference in New Issue
Block a user