emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a31bfd5: Merge recently added kbd tests


From: Stefan Kangas
Subject: master a31bfd5: Merge recently added kbd tests
Date: Fri, 8 Jan 2021 09:26:45 -0500 (EST)

branch: master
commit a31bfd594523dc06941ceb89cdbeabcd4a5d19f7
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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>.
---
 test/lisp/subr-tests.el | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 83031c4..2118530 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -66,9 +66,15 @@
 
 (ert-deftest subr-test-kbd ()
   (should (equal (kbd "f") "f"))
-  (should (equal (kbd "F1") "F1"))
+  (should (equal (kbd "<f1>") [f1]))
   (should (equal (kbd "RET") "\C-m"))
-  (should (equal (kbd "C-x a") "\C-xa")))
+  (should (equal (kbd "C-x a") "\C-xa"))
+  ;; Check that kbd handles both new and old style key descriptions
+  ;; (bug#45536).
+  (should (equal (kbd "s-<return>") [s-return]))
+  (should (equal (kbd "<s-return>") [s-return]))
+  (should (equal (kbd "C-M-<return>") [C-M-return]))
+  (should (equal (kbd "<C-M-return>") [C-M-return])))
 
 (ert-deftest subr-test-define-prefix-command ()
   (define-prefix-command 'foo-prefix-map)
@@ -653,13 +659,5 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350.";
   (should (>= (length (apropos-internal "^help" #'commandp)) 15))
   (should-not (apropos-internal "^next-line$" #'keymapp)))
 
-(ert-deftest subr--kbd ()
-  ;; Check that kbd handles both new and old style key descriptions
-  ;; (bug#45536).
-  (should (equal (kbd "s-<return>") [s-return]))
-  (should (equal (kbd "<s-return>") [s-return]))
-  (should (equal (kbd "C-M-<return>") [C-M-return]))
-  (should (equal (kbd "<C-M-return>") [C-M-return])))
-
 (provide 'subr-tests)
 ;;; subr-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]