Ansi color code not always interpreted well
Hi,
I'm running into an, well, inconvenience when running FitNesse tests in IntelliJ. I created a neat formatter that applies ANSI color codes around passed and failed tests using SMTRunnerConsoleView. In certain cases, notably at the beginning of the output, the escape codes are not interpreted well.
I'm using "<ESC>[30;42m" to set the color (green) and "<ESC>0m" to reset the code. The latter is always picked up, as you can see in attached screenshot. The coloring codes are not picked up, or at least, the color is not changed appropriately and the color key is printed instead.
Note that the coloring is done right near the end of the output.
As a double-check I copied the terminal output to a file and printed that to the console. The coloring was just fine! Also using a plain text console in IntelliJ yields the right result. See also attached screenshots.
You can verify this by installing the "FitNesse" plugin and run one of the tests from the FitNesse integration test suite (I ran the FitNesse test "FitNesse/SuiteAcceptanceTests/SuiteEditResponderTests/TestEditNewPage") .
The code for the formatter can be found here: https://github.com/gshakhn/idea-fitnesse/blob/master/idea-fitnesse_rt/src/main/java/fitnesse/idea/rt/IntelliJFormatter.java.
The run configuration is at https://github.com/gshakhn/idea-fitnesse/blob/master/src/main/scala/fitnesse/idea/run/FitnesseRunConfiguration.scala.
Please note that I added the '** END OF BLOCK **' statements for debugging purposes (this is where the test runner process flushes its buffers).
What's going on?
Thanks,
Arjan
Attachment(s):
capturedoutput.txt.zip
Screen Shot 2015-12-22 at 08.46.53.png
Screen Shot 2015-12-22 at 10.14.35.png
Screen Shot 2015-12-22 at 08.48.54.png
Please sign in to leave a comment.