Add autoload/debug.el unit tests
This commit is contained in:
parent
ca222c1b75
commit
d9e422d64a
1 changed files with 19 additions and 0 deletions
19
test/core/autoload/test-debug.el
Normal file
19
test/core/autoload/test-debug.el
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
;;; test/core/autoload/test-debug.el
|
||||||
|
|
||||||
|
(def-test-group! core/autoload/debug
|
||||||
|
(ert-deftest what-face ()
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert (propertize "Hello " 'face 'font-lock-keyword-face))
|
||||||
|
(insert "world")
|
||||||
|
|
||||||
|
(should (equal (doom/what-face (point-min)) '((font-lock-keyword-face) ())))
|
||||||
|
(should-not (doom/what-face (point-max)))))
|
||||||
|
|
||||||
|
(ert-deftest what-face-overlays ()
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert "Hello world")
|
||||||
|
(let ((ov (make-overlay 1 6)))
|
||||||
|
(overlay-put ov 'face 'font-lock-keyword-face))
|
||||||
|
|
||||||
|
(should (equal (doom/what-face (point-min)) '(() (font-lock-keyword-face))))
|
||||||
|
(should-not (doom/what-face (point-max))))))
|
Loading…
Add table
Add a link
Reference in a new issue