diff options
| author | Stefan Kangas | 2021-12-01 06:30:22 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-12-01 06:30:22 +0100 |
| commit | 93d9bc09f4167100664ac5a3a1cd686e6d7be9a8 (patch) | |
| tree | af395ae58f0bf8c764be5a995657728927305571 /test | |
| parent | 6adf37b4a5a954ac981c2f89ea2c343658f532c2 (diff) | |
| parent | e632b83a281fedf652d254ceaa210438301e2513 (diff) | |
| download | emacs-93d9bc09f4167100664ac5a3a1cd686e6d7be9a8.tar.gz emacs-93d9bc09f4167100664ac5a3a1cd686e6d7be9a8.zip | |
Merge from origin/emacs-28
e632b83a28 Update authors.el for Emacs 28
e9fdb11903 ; * ChangeLog.3: Some additional fixes.
8fa4749df1 ; * ChangeLog.3: Filename fixes.
ea5a90b4f4 * lisp/repeat.el: Fix long-standing problem when a random ...
ef4954b69c * lisp/repeat.el (repeat-keep-prefix): Change default to nil.
6d5886e780 * test/lisp/repeat-tests.el (repeat-tests-call-b): Test fo...
9e16c6a96d ; * src/comp.c (syms_of_comp) <comp-no-native-file-h>: Doc...
9aa8fd6e62 * src/callint.c (Fcall_interactively): Fix inhibit_mouse_e...
70c229b1fc Fix regression in gdb-frame-handler
cd9dd26d24 Format and index concept 'predicate' in ELisp Intro
ab291656d0 ; * ChangeLog.3: Fix typos.
354f6c5609 ; * ChangeLog.3: Formatting fixes.
6192525a96 ; make change-history-commit
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/repeat-tests.el | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/test/lisp/repeat-tests.el b/test/lisp/repeat-tests.el index a1f9bbb1739..02d9ddbc96e 100644 --- a/test/lisp/repeat-tests.el +++ b/test/lisp/repeat-tests.el | |||
| @@ -37,6 +37,8 @@ | |||
| 37 | (defvar repeat-tests-map | 37 | (defvar repeat-tests-map |
| 38 | (let ((map (make-sparse-keymap))) | 38 | (let ((map (make-sparse-keymap))) |
| 39 | (define-key map (kbd "C-x w a") 'repeat-tests-call-a) | 39 | (define-key map (kbd "C-x w a") 'repeat-tests-call-a) |
| 40 | (define-key map (kbd "M-C-a") 'repeat-tests-call-a) | ||
| 41 | (define-key map (kbd "M-C-z") 'repeat-tests-call-a) | ||
| 40 | map) | 42 | map) |
| 41 | "Keymap for keys that initiate repeating sequences.") | 43 | "Keymap for keys that initiate repeating sequences.") |
| 42 | 44 | ||
| @@ -47,7 +49,7 @@ | |||
| 47 | map) | 49 | map) |
| 48 | "Keymap for repeating sequences.") | 50 | "Keymap for repeating sequences.") |
| 49 | (put 'repeat-tests-call-a 'repeat-map 'repeat-tests-repeat-map) | 51 | (put 'repeat-tests-call-a 'repeat-map 'repeat-tests-repeat-map) |
| 50 | (put 'repeat-tests-call-b 'repeat-map 'repeat-tests-repeat-map) | 52 | (put 'repeat-tests-call-b 'repeat-map repeat-tests-repeat-map) |
| 51 | 53 | ||
| 52 | (defmacro with-repeat-mode (&rest body) | 54 | (defmacro with-repeat-mode (&rest body) |
| 53 | "Create environment for testing `repeat-mode'." | 55 | "Create environment for testing `repeat-mode'." |
| @@ -70,6 +72,38 @@ | |||
| 70 | ;; Check for self-inserting keys | 72 | ;; Check for self-inserting keys |
| 71 | (should (equal (buffer-string) inserted))) | 73 | (should (equal (buffer-string) inserted))) |
| 72 | 74 | ||
| 75 | (ert-deftest repeat-tests-check-key () | ||
| 76 | (with-repeat-mode | ||
| 77 | (let ((repeat-echo-function 'ignore)) | ||
| 78 | (let ((repeat-check-key t)) | ||
| 79 | (repeat-tests--check | ||
| 80 | "C-x w a b a c" | ||
| 81 | '((1 a) (1 b) (1 a)) "c") | ||
| 82 | (repeat-tests--check | ||
| 83 | "M-C-a b a c" | ||
| 84 | '((1 a) (1 b) (1 a)) "c") | ||
| 85 | (repeat-tests--check | ||
| 86 | "M-C-z b a c" | ||
| 87 | '((1 a)) "bac") | ||
| 88 | (unwind-protect | ||
| 89 | (progn | ||
| 90 | (put 'repeat-tests-call-a 'repeat-check-key 'no) | ||
| 91 | (repeat-tests--check | ||
| 92 | "M-C-z b a c" | ||
| 93 | '((1 a) (1 b) (1 a)) "c")) | ||
| 94 | (put 'repeat-tests-call-a 'repeat-check-key nil))) | ||
| 95 | (let ((repeat-check-key nil)) | ||
| 96 | (repeat-tests--check | ||
| 97 | "M-C-z b a c" | ||
| 98 | '((1 a) (1 b) (1 a)) "c") | ||
| 99 | (unwind-protect | ||
| 100 | (progn | ||
| 101 | (put 'repeat-tests-call-a 'repeat-check-key t) | ||
| 102 | (repeat-tests--check | ||
| 103 | "M-C-z b a c" | ||
| 104 | '((1 a)) "bac")) | ||
| 105 | (put 'repeat-tests-call-a 'repeat-check-key nil)))))) | ||
| 106 | |||
| 73 | (ert-deftest repeat-tests-exit-key () | 107 | (ert-deftest repeat-tests-exit-key () |
| 74 | (with-repeat-mode | 108 | (with-repeat-mode |
| 75 | (let ((repeat-echo-function 'ignore)) | 109 | (let ((repeat-echo-function 'ignore)) |