summaryrefslogtreecommitdiff
path: root/test/lisp/erc/erc-tests.el
diff options
context:
space:
mode:
authorF. Jason Park <jp@neverwas.me>2022-12-11 19:41:43 -0800
committerF. Jason Park <jp@neverwas.me>2022-12-14 06:40:55 -0800
commit09c0c6b2ba36c6b87e8e495710a580e909bbaf26 (patch)
tree9ca3ca08c2fd2a5fcd155674dcf00afa9b668667 /test/lisp/erc/erc-tests.el
parent44b04c0ac1caef2283076d0784e0407940c14287 (diff)
downloademacs-09c0c6b2ba36c6b87e8e495710a580e909bbaf26.tar.gz
emacs-09c0c6b2ba36c6b87e8e495710a580e909bbaf26.tar.bz2
emacs-09c0c6b2ba36c6b87e8e495710a580e909bbaf26.zip
Limit casemapping to appropriate ranges in ERC
* lisp/erc/erc-common.el (erc-downcase): Use case table for `erc-downcase' so that case conversions are limited to the ASCII interval. * lisp/erc/erc.el (erc-casemapping--rfc1459-strict, erc--casemapping-rfc1459): Make these case tables instead of translation tables. The functions in case-table.el modify the standard syntax table, but that doesn't seem to make sense here, right? * test/lisp/erc/erc-tests.el (erc-downcase): Add cases showing mappings outside of the ASCII range. (Bug#59976.)
Diffstat (limited to 'test/lisp/erc/erc-tests.el')
-rw-r--r--test/lisp/erc/erc-tests.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index 4d0d69cd7b6..51c562f5255 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -428,18 +428,21 @@
(ert-info ("ascii")
(puthash 'CASEMAPPING '("ascii") erc--isupport-params)
+ (should (equal (erc-downcase "ABC 123 ΔΞΩΣ") "abc 123 ΔΞΩΣ"))
(should (equal (erc-downcase "Bob[m]`") "bob[m]`"))
(should (equal (erc-downcase "Tilde~") "tilde~" ))
(should (equal (erc-downcase "\\O/") "\\o/" )))
(ert-info ("rfc1459")
(puthash 'CASEMAPPING '("rfc1459") erc--isupport-params)
+ (should (equal (erc-downcase "ABC 123 ΔΞΩΣ") "abc 123 ΔΞΩΣ"))
(should (equal (erc-downcase "Bob[m]`") "bob{m}`" ))
(should (equal (erc-downcase "Tilde~") "tilde^" ))
(should (equal (erc-downcase "\\O/") "|o/" )))
(ert-info ("rfc1459-strict")
(puthash 'CASEMAPPING '("rfc1459-strict") erc--isupport-params)
+ (should (equal (erc-downcase "ABC 123 ΔΞΩΣ") "abc 123 ΔΞΩΣ"))
(should (equal (erc-downcase "Bob[m]`") "bob{m}`"))
(should (equal (erc-downcase "Tilde~") "tilde~" ))
(should (equal (erc-downcase "\\O/") "|o/" )))))