Rewrite doom-doctor
- Use message library instead of reinventing the wheel - Fix -d/--debug support for `bin/doom doctor` - Add indent and autofill support to print! and format! - Add doom-message-backend for forcing format! to use a specific backend - Phase out anaphoric when! macro in doctor scripts, it was hardly used
This commit is contained in:
parent
51a28249bd
commit
9bea168cc1
5 changed files with 144 additions and 103 deletions
|
@ -3,8 +3,9 @@
|
|||
|
||||
(describe "core/autoload/message"
|
||||
(describe "format!"
|
||||
:var (noninteractive)
|
||||
(before-all (setq noninteractive t))
|
||||
:var (doom-message-backend)
|
||||
(before-all
|
||||
(setq doom-message-backend 'ansi))
|
||||
|
||||
(it "should be a drop-in replacement for `format'"
|
||||
(expect (format! "Hello %s" "World")
|
||||
|
@ -14,8 +15,8 @@
|
|||
(expect (format! (red "Hello %s") "World")
|
||||
:to-equal "[31mHello World[0m"))
|
||||
|
||||
(it "supports faces in interactive sessions"
|
||||
(let (noninteractive)
|
||||
(it "supports text properties in interactive sessions"
|
||||
(let ((doom-message-backend 'text-properties))
|
||||
(expect (get-text-property 0 'face (format! (red "Hello %s") "World"))
|
||||
:to-equal (list :foreground (face-foreground 'term-color-red)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue