Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Broken Formatting When Running in SLIME/SLY #53

Open
artforlife opened this issue Mar 4, 2018 · 5 comments
Open

Broken Formatting When Running in SLIME/SLY #53

artforlife opened this issue Mar 4, 2018 · 5 comments

Comments

@artforlife
Copy link

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)�[0m

Summary:
All 2 files passed.

The strange characters are actually ^[.

Am I doing something wrong or is this a bug?

@vindarel
Copy link

vindarel commented Mar 4, 2018

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

@artforlife
Copy link
Author

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?

@artforlife
Copy link
Author

Also, thanks for your help. I am MadPhysicist from StackOverflow :-) You help me everywhere I go!

@vindarel
Copy link

vindarel commented Mar 5, 2018

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)))

@itegebo
Copy link

itegebo commented Jun 15, 2018

You also might want to mention,

https://github.com/PuercoPop/sly-repl-ansi-color

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants