diff options
| author | Tino Calancha | 2022-05-11 18:01:11 +0200 |
|---|---|---|
| committer | Tino Calancha | 2022-05-11 18:03:57 +0200 |
| commit | 7f2fb992110a60a8b583db76fd3b3ee0f1c7efb9 (patch) | |
| tree | 5c9df528fcdd94bab19f89512ccb7278cf94eaa7 /test | |
| parent | 4e7879f807b43416568154d31bc49d3e7393d583 (diff) | |
| download | emacs-7f2fb992110a60a8b583db76fd3b3ee0f1c7efb9.tar.gz emacs-7f2fb992110a60a8b583db76fd3b3ee0f1c7efb9.zip | |
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')
| -rw-r--r-- | test/lisp/subr-tests.el | 7 |
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.")) | |||
| 1074 | (should (= subr-test--local 2)) | 1074 | (should (= subr-test--local 2)) |
| 1075 | (should-not (boundp 'subr-test--unexist))))) | 1075 | (should-not (boundp 'subr-test--unexist))))) |
| 1076 | 1076 | ||
| 1077 | (ert-deftest test-char-uppercase-p () | ||
| 1078 | "Tests for `char-uppercase-p'." | ||
| 1079 | (dolist (c (list ?R ?S ?Ω ?Ψ)) | ||
| 1080 | (should (char-uppercase-p c))) | ||
| 1081 | (dolist (c (list ?a ?b ?α ?β)) | ||
| 1082 | (should-not (char-uppercase-p c)))) | ||
| 1083 | |||
| 1077 | (provide 'subr-tests) | 1084 | (provide 'subr-tests) |
| 1078 | ;;; subr-tests.el ends here | 1085 | ;;; subr-tests.el ends here |