hsx/tests/escaper.lisp

15 lines
427 B
Common Lisp
Raw Normal View History

2024-05-31 09:39:25 +00:00
(defpackage #:hsx-test/escaper
(:use #:cl
#:rove
2024-05-31 09:39:25 +00:00
#:hsx/escaper))
(in-package #:hsx-test/escaper)
(deftest escaper-test
(testing "escape-html-attribute"
(ok (string= ""foo""
(escape-html-attribute "\"foo\""))))
(testing "escape-html-text-content"
(ok (string= "&<>"'/`="
(escape-html-text-content "&<>\"'/`=")))))