summaryrefslogtreecommitdiff
path: root/test/lisp/subr-tests.el
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2022-05-11 18:01:11 +0200
committerTino Calancha <tino.calancha@gmail.com>2022-05-11 18:03:57 +0200
commit7f2fb992110a60a8b583db76fd3b3ee0f1c7efb9 (patch)
tree5c9df528fcdd94bab19f89512ccb7278cf94eaa7 /test/lisp/subr-tests.el
parent4e7879f807b43416568154d31bc49d3e7393d583 (diff)
downloademacs-7f2fb992110a60a8b583db76fd3b3ee0f1c7efb9.tar.gz
char-uppercase-p: New predicate
Return non-nil if its argument is an uppercase character. Suggested in Bug#54804. * lisp/subr.el (char-uppercase-p): New defun. * etc/NEWS (Lisp Changes in Emacs 29.1): Announce it * doc/lispref/display.texi (Size of Displayed Text): Document it. * test/lisp/subr-tests.el (test-char-uppercase-p): Add a test.
Diffstat (limited to 'test/lisp/subr-tests.el')
-rw-r--r--test/lisp/subr-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 89803e5ce2e..a25eb363b01 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -1074,5 +1074,12 @@ final or penultimate step during initialization."))
(should (= subr-test--local 2))
(should-not (boundp 'subr-test--unexist)))))
+(ert-deftest test-char-uppercase-p ()
+ "Tests for `char-uppercase-p'."
+ (dolist (c (list ?R ?S ?Ω ?Ψ))
+ (should (char-uppercase-p c)))
+ (dolist (c (list ?a ?b ?α ?β))
+ (should-not (char-uppercase-p c))))
+
(provide 'subr-tests)
;;; subr-tests.el ends here