mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-20 16:11:07 -05:00
Refactor and fix unit tests, plus isolate them better
This commit is contained in:
@@ -147,10 +147,13 @@
|
||||
|
||||
;; --- Settings ---------------------------
|
||||
|
||||
(def-setting! :-test-setting (x) x)
|
||||
|
||||
(def-test! set
|
||||
(should (assq :-test-setting doom-settings))
|
||||
(should (set! :-test-setting t))
|
||||
(let ((inhibit-message t))
|
||||
(should-not (set! :non-existant-setting (error "This shouldn't trigger")))))
|
||||
(eval-and-compile
|
||||
(let (doom-settings)
|
||||
(def-setting! :-test-setting (x) `(setq result ,x))
|
||||
(should (assq :-test-setting doom-settings))
|
||||
(let ((inhibit-message t)
|
||||
result)
|
||||
(set! :-test-setting t)
|
||||
(should result)
|
||||
(set! :non-existant-setting (error "This shouldn't trigger"))))))
|
||||
|
Reference in New Issue
Block a user