mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-19 13:43:36 -05:00
+ Moved unit tests out of tests/ and into their respective modules.
+ Rewrite makefile and added these tasks:
+ <MODULE>/<SUBMODULE> -- byte-compile a specific module
+ test:<MODULE>/<SUBMODULE> -- runs tests for a specific module
+ testi -- run tests in an interactive session of Emacs (WIP)
+ run -- opens an Emacs session with this config; useful when it is in
a non-standard location.
20 lines
618 B
EmacsLisp
20 lines
618 B
EmacsLisp
;; -*- no-byte-compile: t; -*-
|
|
;;; core/test/autoload-debug.el
|
|
|
|
(def-test! 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)))))
|
|
|
|
(def-test! 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)))))
|