mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05:39 +02:00
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
This commit is contained in:
@@ -1449,6 +1449,7 @@ Reporters.tests.cpp:<line number>: passed: listingString, ContainsSubstring( "fa
|
||||
</SourceInfo>
|
||||
</TestCase>
|
||||
</MatchingTests>" ( contains: "fake test name" and contains: "fakeTestTag" ) with 1 message: 'Tested reporter: xml'
|
||||
Reporters.tests.cpp:<line number>: passed:
|
||||
Message.tests.cpp:<line number>: passed: with 1 message: 'this is a success'
|
||||
Message.tests.cpp:<line number>: passed:
|
||||
BDD.tests.cpp:<line number>: passed: before == 0 for: 0 == 0
|
||||
|
Reference in New Issue
Block a user