X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcolorize-control-codes.lisp;fp=tests%2Fcolorize-control-codes.lisp;h=8bd15922f33869c8e4bef2317751fc3de6473eea;hb=1e1256e90b46cbe903642d7bdc2f183ef19ccf15;hp=0000000000000000000000000000000000000000;hpb=e345436f0efaca2c0ba6be2c30ce6b5a3dae3836;p=sbcl.git diff --git a/tests/colorize-control-codes.lisp b/tests/colorize-control-codes.lisp new file mode 100644 index 0000000..8bd1592 --- /dev/null +++ b/tests/colorize-control-codes.lisp @@ -0,0 +1,11 @@ +(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))