[committed] diagnostics, v2: Fix up selftests with $COLUMNS < 42 [PR108973]
Commit Message
On Fri, Mar 03, 2023 at 08:54:32AM -0500, David Malcolm wrote:
> Thanks for working on this.
>
> Patch is OK, but I wonder if it would even better to just hardcode
> caret_max_width as 80 here, to better eliminate that influence from
> from the environment in the unit tests? I think all of the tests that
> modify caret_max_width do so after the ctor has run.
Thanks, here is what I've committed after another bootstrap/regtest:
2023-03-04 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108973
* selftest-diagnostic.cc
(test_diagnostic_context::test_diagnostic_context): Set
caret_max_width to 80.
Jakub
@@ -41,6 +41,7 @@ test_diagnostic_context::test_diagnostic
show_column = true;
start_span = start_span_cb;
min_margin_width = 6;
+ caret_max_width = 80;
}
test_diagnostic_context::~test_diagnostic_context ()