Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better coverage!
This commit is contained in:
parent
98d2f1de3f
commit
eaca8c58fa
41 changed files with 1371 additions and 1101 deletions
31
core/test/test-autoload-help.el
Normal file
31
core/test/test-autoload-help.el
Normal file
|
@ -0,0 +1,31 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; core/test/test-autoload-help.el
|
||||
|
||||
(load! "autoload/help" doom-core-dir)
|
||||
|
||||
;;
|
||||
(describe "core/autoload/help"
|
||||
:var (a)
|
||||
(before-each (setq a (switch-to-buffer (get-buffer-create "a"))))
|
||||
(after-each (kill-buffer a))
|
||||
|
||||
(describe "what-face"
|
||||
(before-each
|
||||
(insert (propertize "Hello " 'face 'font-lock-keyword-face))
|
||||
(insert "world"))
|
||||
(it "returns list of faces at point"
|
||||
(expect (doom/what-face (point-min)) :to-equal '((font-lock-keyword-face) ())))
|
||||
(it "returns nil if no faces at point"
|
||||
(expect (doom/what-face (point-max)) :to-be nil)))
|
||||
|
||||
(describe "what-face overlays"
|
||||
(before-each
|
||||
(insert "Hello world")
|
||||
(let ((ov (make-overlay 1 6)))
|
||||
(overlay-put ov 'face 'font-lock-keyword-face)))
|
||||
|
||||
(it "returns list of overlays at point"
|
||||
(expect (doom/what-face (point-min)) :to-equal '(() (font-lock-keyword-face))))
|
||||
(it "returns nil if no overlays at point"
|
||||
(expect (doom/what-face (point-max)) :to-be nil))))
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue