Console output when running tests in CLion

  • I am writing tests using Catch2. Everything is good and works. The only thing that is a little confusing is the log output.

    The log output format is as follows in the Test Toolbar (there are test logs displayed here) :

    \ x1B [01; 37m [16:45:29] [Info]: \ x1B [22; 37mHello

    At the same time, if we are talking about output to the usual CLion console, everything is output well:

    [16:45:29] [Info]: Hello

    Maybe someone knows how to fix this and is it fixable at all?

  • Catch2 tries to colorize the console and mistakenly thinks TestToolbar is a color-coded console. But you can help him - just add the parameter

    --use-color no

    If the parameter is difficult to write (I know CLion can be a little strange), then you can write CATCH_CONFIG_COLOR_NONE directly in tests

Log in to reply

Suggested Topics

  • 2
  • 4
  • 2
  • 2
  • 2