Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output messages not properly formatted in IntelliJ #1

Open
oleksandr-murha opened this issue Jan 8, 2016 · 4 comments
Open

Output messages not properly formatted in IntelliJ #1

oleksandr-murha opened this issue Jan 8, 2016 · 4 comments
Labels

Comments

@oleksandr-murha
Copy link

Messages are correctly formatted in terminal.

But in IntelliJ formatting is wrong.

terminal

intellij

visible-assertion version - 1.0.4
IntelliJ version - 14.1.5

@rnorth
Copy link
Owner

rnorth commented Jan 8, 2016

Yes, you're correct, and I need to look into that. In my recent experience (more strangely!) the output is only broken when looking at the JUnit root level in the IntelliJ run window; when selecting an individual test it looks OK to me.

This suggests that there's a change needed, either to adapt to IntelliJ's behaviour, or to be more proactive about detecting ANSI colour support and disabling it in such contexts.

Thank you for raising this.

@rnorth rnorth added the bug label Jan 8, 2016
@oleksandr-murha
Copy link
Author

Strangely, every execution of individual test produce different output.

fail1

fail2

fail3

success1

success2

Also what I noticed is that after test execution it prints correctly, but after a half a second or so, text in run console get replaced with a codes (like on a screen-shot).

rnorth added a commit that referenced this issue Jan 8, 2016
…TTY support. As a result of this, no run output will be coloured in IntelliJ, but this seems marginally better than having output that is corrupt when viewed in certain modes.

This is a workaround for issues described elsewhere:
fusesource/jansi#31
https://youtrack.jetbrains.com/issue/IDEA-132822

Refs #1
@rnorth
Copy link
Owner

rnorth commented Jan 8, 2016

As a workaround for this, I've made a small change in this branch to disable use of ANSI colour codes when running under IntelliJ. It's not ideal (I'd prefer to keep the coloured output), but at least it doesn't give 'corrupt' output.

It's really interesting that you noticed correct output being replaced with the escape codes, though - I'll try and reproduce.

If anybody else who comes across this knows of other tools that manage to retain coloured ANSI output in IntelliJ I'd be really keen to find out how they do it!

@oleksandr-murha
Copy link
Author

Did some more testing, and it seems like this issue only happening for messes printed before stack-trace.
Everything after stack-trace is fine. If there no stack-trace at all (all green) everything is printed fine.

Also the order of assert messages and stack-traces is mixed up. Is it at all possible to achieve in IntelliJ the same behavior as in Terminal when all assertion messages come first and then stack-traces?

newintellij

newterminal

rnorth added a commit that referenced this issue Jul 15, 2017
…TTY support. As a result of this, no run output will be coloured in IntelliJ, but this seems marginally better than having output that is corrupt when viewed in certain modes.

This is a workaround for issues described elsewhere:
fusesource/jansi#31
https://youtrack.jetbrains.com/issue/IDEA-132822

Refs #1
rnorth added a commit that referenced this issue Jul 15, 2017
…TTY support. As a result of this, no run output will be coloured in IntelliJ, but this seems marginally better than having output that is corrupt when viewed in certain modes.

This is a workaround for issues described elsewhere:
fusesource/jansi#31
https://youtrack.jetbrains.com/issue/IDEA-132822

Refs #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants