diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-18 09:57:43 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-18 09:57:54 +0100 |
commit | 19fefea1ca567cc08c67a2167f8e366483b1c013 (patch) | |
tree | 2fe6221132f72b3c163168c5b9dc3d55a3b1cba7 /test/lisp/international/textsec-tests.el | |
parent | 65c9f57856ec0b188f635149bf3c120195832dae (diff) | |
download | emacs-19fefea1ca567cc08c67a2167f8e366483b1c013.tar.gz emacs-19fefea1ca567cc08c67a2167f8e366483b1c013.tar.bz2 emacs-19fefea1ca567cc08c67a2167f8e366483b1c013.zip |
Add textsec support for confusable characters
* admin/notes/unicode: Note the confusables.txt file.
* admin/unidata/Makefile.in (${unidir}/uni-confusable.el):
Generate the confusable file.
* admin/unidata/README (https): Add confusables.txt.
* admin/unidata/confusables.txt: New file.
* admin/unidata/unidata-gen.el (unidata-gen-confusable): Parse the
confusables.txt file.
* lisp/international/textsec.el (textsec-ascii-confusable-p)
(textsec-unconfuse-string): New functions.
Diffstat (limited to 'test/lisp/international/textsec-tests.el')
-rw-r--r-- | test/lisp/international/textsec-tests.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/international/textsec-tests.el b/test/lisp/international/textsec-tests.el index 3738545e073..50106bb955e 100644 --- a/test/lisp/international/textsec-tests.el +++ b/test/lisp/international/textsec-tests.el @@ -86,4 +86,11 @@ (should-not (textsec-mixed-numbers-p "8foo8")) (should (textsec-mixed-numbers-p "8foo৪"))) +(ert-deftest test-confusable () + (should (equal (textsec-unconfuse-string "ljeto") "ljeto")) + (should (textsec-ascii-confusable-p "ljeto")) + (should-not (textsec-ascii-confusable-p "ljeto")) + (should (equal (textsec-unconfuse-string "~") "〜")) + (should-not (textsec-ascii-confusable-p "~"))) + ;;; textsec-tests.el ends here |