summaryrefslogtreecommitdiff
path: root/test/lisp/net/puny-tests.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-11-19 07:42:55 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-11-19 07:46:06 +0100
commit023dc2ac8fb004c16748fa98223a1fb88cfa2186 (patch)
tree92f0f3b6fd55e518b8283d282906ac54ded62065 /test/lisp/net/puny-tests.el
parent19e78601a03c96731f4c01c38a0966b5e27e57f3 (diff)
downloademacs-023dc2ac8fb004c16748fa98223a1fb88cfa2186.tar.gz
Make puny-encode-string normalize first
* lisp/net/puny.el (puny-encode-string): Normalize before encoding (bug#51954).
Diffstat (limited to 'test/lisp/net/puny-tests.el')
-rw-r--r--test/lisp/net/puny-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/net/puny-tests.el b/test/lisp/net/puny-tests.el
index 28c0d49cbee..9119084209e 100644
--- a/test/lisp/net/puny-tests.el
+++ b/test/lisp/net/puny-tests.el
@@ -61,4 +61,11 @@
;; Only allowed in unrestricted.
(should-not (puny-highly-restrictive-domain-p "I♥NY.org")))
+(ert-deftest puny-normalize ()
+ (should (equal (puny-encode-string (string-glyph-compose "Bä.com"))
+ "xn--b.com-gra"))
+ (should (equal (puny-encode-string "Bä.com")
+ "xn--b.com-gra"))
+ (should (equal (puny-encode-string "Bä.com") "xn--b.com-gra")))
+
;;; puny-tests.el ends here