-
- Downloads
Fix bad indentation calculation in the console reporter
The problem came from the console reporter trying to provide a fancy linebreaking (primarily for things like `SCENARIO` or the BDD macros), so that new lines start with extra indentation if the text being line broken starts as "{text}: ". The console reporter did not properly take into account cases where the ": " part would already be in a later line, in which case it would ask for non-sensical level of indentation (larger than single line length). We fixed this by also enforcing that the special indentation case only triggers if the ": " is found early enough in the line, so that we also avoid degenerate cases like this: ``` blablabla: F a n c y . . . ``` Fixes #2309
Showing
- src/catch2/reporters/catch_reporter_console.cpp 30 additions, 8 deletionssrc/catch2/reporters/catch_reporter_console.cpp
- tests/SelfTest/Baselines/automake.sw.approved.txt 1 addition, 0 deletionstests/SelfTest/Baselines/automake.sw.approved.txt
- tests/SelfTest/Baselines/compact.sw.approved.txt 1 addition, 0 deletionstests/SelfTest/Baselines/compact.sw.approved.txt
- tests/SelfTest/Baselines/console.std.approved.txt 2 additions, 2 deletionstests/SelfTest/Baselines/console.std.approved.txt
- tests/SelfTest/Baselines/console.sw.approved.txt 11 additions, 2 deletionstests/SelfTest/Baselines/console.sw.approved.txt
- tests/SelfTest/Baselines/junit.sw.approved.txt 2 additions, 1 deletiontests/SelfTest/Baselines/junit.sw.approved.txt
- tests/SelfTest/Baselines/sonarqube.sw.approved.txt 1 addition, 0 deletionstests/SelfTest/Baselines/sonarqube.sw.approved.txt
- tests/SelfTest/Baselines/tap.sw.approved.txt 3 additions, 1 deletiontests/SelfTest/Baselines/tap.sw.approved.txt
- tests/SelfTest/Baselines/teamcity.sw.approved.txt 2 additions, 0 deletionstests/SelfTest/Baselines/teamcity.sw.approved.txt
- tests/SelfTest/Baselines/xml.sw.approved.txt 5 additions, 2 deletionstests/SelfTest/Baselines/xml.sw.approved.txt
- tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp 5 additions, 0 deletionstests/SelfTest/IntrospectiveTests/Reporters.tests.cpp
Loading
Please register or sign in to comment