Make textsec-mixed-numbers-p actually work

* lisp/international/textsec.el (textsec-mixed-numbers-p): Fix the
test.
This commit is contained in:
Lars Ingebrigtsen 2022-01-19 18:50:40 +01:00
parent b28f420737
commit 50ddfb2428
2 changed files with 3 additions and 1 deletions

View file

@ -169,7 +169,8 @@ Levels are (in decreasing order of restrictiveness) `ascii-only',
(seq-uniq
(mapcar
(lambda (char)
(get-char-code-property char 'numeric-value))
;; Compare zeros in the respective decimal systems.
(- char (get-char-code-property char 'numeric-value)))
(seq-filter (lambda (char)
;; We're selecting the characters that
;; have a numeric property.

View file

@ -84,6 +84,7 @@
(ert-deftest test-mixed-numbers ()
(should-not (textsec-mixed-numbers-p "foo"))
(should-not (textsec-mixed-numbers-p "8foo8"))
(should-not (textsec-mixed-numbers-p "foo20@foo.org"))
(should (textsec-mixed-numbers-p "8foo")))
(ert-deftest test-resolved ()