diff options
| author | Juanma Barranquero | 2015-11-12 23:36:33 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2015-11-12 23:42:23 +0100 |
| commit | 6e5186e8a7ccfb9b8fb35b5f4f0371e4f4a68162 (patch) | |
| tree | b6e19dd47da84171a1eef81f870b9bbef606e6de | |
| parent | 0c928266114aa75c7bfa1842fe5023174d2984c8 (diff) | |
| download | emacs-6e5186e8a7ccfb9b8fb35b5f4f0371e4f4a68162.tar.gz emacs-6e5186e8a7ccfb9b8fb35b5f4f0371e4f4a68162.zip | |
* test/automated/keymaps-test.el: Fix test to make it repeatable
(keymap-store_in_keymap-FASTINT-on-nonchars): Reset Buffer-menu-mode-map
entry to its initial value to make the test repeatable in interactive
sessions (assuming it doesn't fail and crashes Emacs, of course).
| -rw-r--r-- | test/automated/keymap-tests.el | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/automated/keymap-tests.el b/test/automated/keymap-tests.el index 482ed27cd4f..973b2407391 100644 --- a/test/automated/keymap-tests.el +++ b/test/automated/keymap-tests.el | |||
| @@ -26,13 +26,17 @@ | |||
| 26 | (ert-deftest keymap-store_in_keymap-FASTINT-on-nonchars () | 26 | (ert-deftest keymap-store_in_keymap-FASTINT-on-nonchars () |
| 27 | "Check for bug fixed in \"Fix assertion violation in define-key\", | 27 | "Check for bug fixed in \"Fix assertion violation in define-key\", |
| 28 | commit 86c19714b097aa477d339ed99ffb5136c755a046." | 28 | commit 86c19714b097aa477d339ed99ffb5136c755a046." |
| 29 | (should-not (eq (lookup-key Buffer-menu-mode-map [32]) 'undefined)) | 29 | (let ((def (lookup-key Buffer-menu-mode-map [32]))) |
| 30 | ;; This will cause an assertion violation if the bug is present. | 30 | (unwind-protect |
| 31 | ;; We could run an inferior Emacs process and check for the return | 31 | (progn |
| 32 | ;; status, but in some environments an assertion failure triggers | 32 | (should-not (eq def 'undefined)) |
| 33 | ;; an abort dialog that requires user intervention anyway. | 33 | ;; This will cause an assertion violation if the bug is present. |
| 34 | (define-key Buffer-menu-mode-map [(32 . 126)] 'undefined) | 34 | ;; We could run an inferior Emacs process and check for the return |
| 35 | (should (eq (lookup-key Buffer-menu-mode-map [32]) 'undefined))) | 35 | ;; status, but in some environments an assertion failure triggers |
| 36 | ;; an abort dialog that requires user intervention anyway. | ||
| 37 | (define-key Buffer-menu-mode-map [(32 . 32)] 'undefined) | ||
| 38 | (should (eq (lookup-key Buffer-menu-mode-map [32]) 'undefined))) | ||
| 39 | (define-key Buffer-menu-mode-map [32] def)))) | ||
| 36 | 40 | ||
| 37 | (provide 'keymap-tests) | 41 | (provide 'keymap-tests) |
| 38 | 42 | ||