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

CATCH_CONFIG_CONSOLE_WIDTH only partially effective #1339

Open
arnemertz opened this issue Jul 18, 2018 · 0 comments
Open

CATCH_CONFIG_CONSOLE_WIDTH only partially effective #1339

arnemertz opened this issue Jul 18, 2018 · 0 comments

Comments

@arnemertz
Copy link
Contributor

Description

Setting CATCH_CONFIG_CONSOLE_WIDTH to a smaller value shows that the value is honored only in some parts of the output.

Steps to reproduce

Compile this simple test case with -DCATCH_CONFIG_CONSOLE_WIDTH=20:

#define CATCH_CONFIG_MAIN
#include "catch.hpp"

TEST_CASE( "o_hello_really_long_string_over_20_chars" ) {
	REQUIRE( "Hello Catch!" == "Hello, Catch2!");
}

The output looks like this:

~~~~~~~~~~~~~~~~~~~
tests.exe is a Catch v2.2.3 host application.
Run with -? for options

-------------------
o_hello_really_lon-
g_string_over_20_c-
hars
-------------------
C:\Users\marn\Documents\GitHub\hello_cmake\test\testmain.cpp(8)
...................

C:\Users\marn\Documents\GitHub\hello_cmake\test\testmain.cpp(9): FAILED:
  REQUIRE( "Hello Catch!" == "Hello, Catch2!" )

===================
test cases: 1 | 1 failed
assertions: 1 | 1 failed

Except for the test case name and the separator lines, every non-empty line is longer than the configured width of 20.

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

No branches or pull requests

1 participant