From: Juri Linkov Date: Thu, 21 Oct 2021 17:22:15 +0000 (+0300) Subject: * test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys. X-Git-Tag: emacs-28.0.90~225 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2841e26744d6f5f055ad37e7b104dbfb92afca69;p=emacs.git * 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. --- diff --git a/test/lisp/dabbrev-tests.el b/test/lisp/dabbrev-tests.el index e4b78373915..d3fe78b6185 100644 --- a/test/lisp/dabbrev-tests.el +++ b/test/lisp/dabbrev-tests.el @@ -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 diff --git a/test/lisp/emacs-lisp/find-func-tests.el b/test/lisp/emacs-lisp/find-func-tests.el index 28a9a7ecda3..987e4047d35 100644 --- a/test/lisp/emacs-lisp/find-func-tests.el +++ b/test/lisp/emacs-lisp/find-func-tests.el @@ -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 diff --git a/test/lisp/international/mule-tests.el b/test/lisp/international/mule-tests.el index 7727c118b2c..8ca1ade771d 100644 --- a/test/lisp/international/mule-tests.el +++ b/test/lisp/international/mule-tests.el @@ -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."