mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Failures in red, unexpected success in green. Works on Windows and on terminals with ANSI escape code support. Can be disabled with --no-color.
12 lines
247 B
Common Lisp
12 lines
247 B
Common Lisp
(defun ascii-color (color)
|
|
(ecase color
|
|
(:red 31)
|
|
(:green 32)))
|
|
|
|
(defun %output-colored-text (text color &key bold)
|
|
(format t "~c[~a~:[~;;1~]m~a~c[0m"
|
|
#\Esc
|
|
(ascii-color color)
|
|
bold
|
|
text #\Esc))
|