doomemacs/modules/lang/web/test/autoload-html.el
Henrik Lissner 7477546892
Fix lang/web's html entity encode/decode functions
Also, add unit tests and don't encode spaces.
2017-07-03 03:39:18 +02:00

13 lines
515 B
EmacsLisp

;;; lang/web/test/autoload-html.el -*- lexical-binding: t; -*-
(def-test! encode-entities
(should (equal (+web-encode-entities "Hello world")
"Hello world"))
(should (equal (+web-encode-entities "H€llø wørld")
"H€llø wørld")))
(def-test! decode-entities
(should (equal (+web-decode-entities "Hello world")
"Hello world"))
(should (equal (+web-decode-entities "H€llø wørld")
"H€llø wørld")))