Broken Formatting When Running in SLIME/SLY
artforlife opened this issue · 5 comments
When I run Prove tests in SLIME using the ASDF integration, I get the following formatting:
�[32m✓ 0 tests completed�[0m �[90m(0ms)�[0m
Running a test file '/Users/xxx/xxx/cl-mongo-json.lisp'
1..3�[32m✓ �[90mT is expected to be T�[0m
�[0m
�[32m✓ �[90m4 is expected to be 4�[0m
�[0m
�[32m✓ �[90m1 is not expected to be #\1�[0m
�[0m
�[32m✓ 3 tests completed�[0m �[90m(0ms)�[0mSummary:
All 2 files passed.
The strange characters are actually ^[
.
Am I doing something wrong or is this a bug?
Hello
Those are ansi color settings, for use in a terminal (or slime with an extension, see link below).
try setting
(setf prove:*enable-colors* nil)
it's suprising it is on by default, it's off for me.
see https://github.com/fukamachi/prove#colorize-test-reports-on-slime
I believe this fixed it. How can I make sure this is always done for this system? Should this be placed into the first test file or ASDF declaration?
Also, thanks for your help. I am MadPhysicist from StackOverflow :-) You help me everywhere I go!
eheh, awesome^^ It's nice that as a newcomer you find helping hands :)
Not sure where best to put the setting to always disable it (sbclrc ?). Is is the same with (prove:run…
?
On the contrary, you can also always load slime-repl-ansi-on.el
to have nice colors.
;; .emacs.d/init.el
(defvar my-elisp-files '(
"~/.emacs.d//vendor/slime-repl-ansi-color.el"
)
(dolist (lib my-elisp-files)
(if (file-exists-p lib)
(load-file lib)))
You also might want to mention,