projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Test-suite results colorization.
[sbcl.git]
/
tests
/
colorize-control-codes.lisp
diff --git a/tests/colorize-control-codes.lisp
b/tests/colorize-control-codes.lisp
new file mode 100644
(file)
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))