Commit 905bf43
committed
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 #23091 parent 0fdee1c commit 905bf43
11 files changed
Lines changed: 63 additions & 16 deletions
File tree
- src/catch2/reporters
- tests/SelfTest
- Baselines
- IntrospectiveTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
563 | | - | |
564 | 562 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
571 | 593 | | |
572 | 594 | | |
573 | 595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1449 | 1449 | | |
1450 | 1450 | | |
1451 | 1451 | | |
| 1452 | + | |
1452 | 1453 | | |
1453 | 1454 | | |
1454 | 1455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
1429 | | - | |
1430 | | - | |
| 1429 | + | |
| 1430 | + | |
1431 | 1431 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10231 | 10231 | | |
10232 | 10232 | | |
10233 | 10233 | | |
| 10234 | + | |
| 10235 | + | |
| 10236 | + | |
| 10237 | + | |
| 10238 | + | |
| 10239 | + | |
| 10240 | + | |
| 10241 | + | |
| 10242 | + | |
10234 | 10243 | | |
10235 | 10244 | | |
10236 | 10245 | | |
| |||
17030 | 17039 | | |
17031 | 17040 | | |
17032 | 17041 | | |
17033 | | - | |
17034 | | - | |
| 17042 | + | |
| 17043 | + | |
17035 | 17044 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
| 1166 | + | |
1166 | 1167 | | |
1167 | 1168 | | |
1168 | 1169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2590 | 2590 | | |
2591 | 2591 | | |
2592 | 2592 | | |
| 2593 | + | |
| 2594 | + | |
2593 | 2595 | | |
2594 | 2596 | | |
2595 | 2597 | | |
| |||
4264 | 4266 | | |
4265 | 4267 | | |
4266 | 4268 | | |
4267 | | - | |
| 4269 | + | |
4268 | 4270 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
494 | 496 | | |
495 | 497 | | |
496 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12248 | 12248 | | |
12249 | 12249 | | |
12250 | 12250 | | |
| 12251 | + | |
| 12252 | + | |
| 12253 | + | |
12251 | 12254 | | |
12252 | 12255 | | |
12253 | 12256 | | |
| |||
20027 | 20030 | | |
20028 | 20031 | | |
20029 | 20032 | | |
20030 | | - | |
20031 | | - | |
| 20033 | + | |
| 20034 | + | |
20032 | 20035 | | |
0 commit comments