diff options
| author | Stefan Kangas | 2021-01-08 15:26:02 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-01-08 15:26:11 +0100 |
| commit | a31bfd594523dc06941ceb89cdbeabcd4a5d19f7 (patch) | |
| tree | 2de40826d75cff295554246895c49ae0a30fe346 | |
| parent | 5ac7b480757d8731fe2bda0452e48f0cd0356aa4 (diff) | |
| download | emacs-a31bfd594523dc06941ceb89cdbeabcd4a5d19f7.tar.gz emacs-a31bfd594523dc06941ceb89cdbeabcd4a5d19f7.zip | |
Merge recently added kbd tests
* test/lisp/subr-tests.el (subr--kbd): Merge test...
(subr-test-kbd): ...with this one. Fix thinko in my previous commit.
Thanks to Mattias EngdegÄrd <mattiase@acm.org>.
| -rw-r--r-- | test/lisp/subr-tests.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 83031c44fcd..21185303360 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el | |||
| @@ -66,9 +66,15 @@ | |||
| 66 | 66 | ||
| 67 | (ert-deftest subr-test-kbd () | 67 | (ert-deftest subr-test-kbd () |
| 68 | (should (equal (kbd "f") "f")) | 68 | (should (equal (kbd "f") "f")) |
| 69 | (should (equal (kbd "F1") "F1")) | 69 | (should (equal (kbd "<f1>") [f1])) |
| 70 | (should (equal (kbd "RET") "\C-m")) | 70 | (should (equal (kbd "RET") "\C-m")) |
| 71 | (should (equal (kbd "C-x a") "\C-xa"))) | 71 | (should (equal (kbd "C-x a") "\C-xa")) |
| 72 | ;; Check that kbd handles both new and old style key descriptions | ||
| 73 | ;; (bug#45536). | ||
| 74 | (should (equal (kbd "s-<return>") [s-return])) | ||
| 75 | (should (equal (kbd "<s-return>") [s-return])) | ||
| 76 | (should (equal (kbd "C-M-<return>") [C-M-return])) | ||
| 77 | (should (equal (kbd "<C-M-return>") [C-M-return]))) | ||
| 72 | 78 | ||
| 73 | (ert-deftest subr-test-define-prefix-command () | 79 | (ert-deftest subr-test-define-prefix-command () |
| 74 | (define-prefix-command 'foo-prefix-map) | 80 | (define-prefix-command 'foo-prefix-map) |
| @@ -653,13 +659,5 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350." | |||
| 653 | (should (>= (length (apropos-internal "^help" #'commandp)) 15)) | 659 | (should (>= (length (apropos-internal "^help" #'commandp)) 15)) |
| 654 | (should-not (apropos-internal "^next-line$" #'keymapp))) | 660 | (should-not (apropos-internal "^next-line$" #'keymapp))) |
| 655 | 661 | ||
| 656 | (ert-deftest subr--kbd () | ||
| 657 | ;; Check that kbd handles both new and old style key descriptions | ||
| 658 | ;; (bug#45536). | ||
| 659 | (should (equal (kbd "s-<return>") [s-return])) | ||
| 660 | (should (equal (kbd "<s-return>") [s-return])) | ||
| 661 | (should (equal (kbd "C-M-<return>") [C-M-return])) | ||
| 662 | (should (equal (kbd "<C-M-return>") [C-M-return]))) | ||
| 663 | |||
| 664 | (provide 'subr-tests) | 662 | (provide 'subr-tests) |
| 665 | ;;; subr-tests.el ends here | 663 | ;;; subr-tests.el ends here |