Configure and disable word wrap in console reporter
Right now the console reporter hard-codes the column width to 80 (default determined by Clara):
void printMessage() const {
if (!messageLabel.empty())
stream << messageLabel << ':' << '\n';
for (auto const& msg : messages) {
// If this assertion is a warning ignore any INFO messages
if (printInfoMessages || msg.type != ResultWas::Info)
stream << Column(msg.message).indent(2) << '\n';
}
}
I'd like for each message to be printed with a custom column width, or no column width (disable word wrap). Is there a mechanism to do this right now? If not, what would be the best way to configure this? Looking for an ideal design approach and am happy to implement it.
@philsquared Please advise on your ideal design, I don't want to waste effort on a PR if I don't do things how you prefer them to be. Thanks.
@philsquared: Would love to get your feedback on this. I know you're busy but hopefully you can spare a few minutes. Thanks!
Has this been resolved? I have a specific use-case for which line-wrapping makes my error messages almost unreadable in some cases.
This can be configured at compile time by #define CATCH_CONFIG_CONSOLE_WIDTH or CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH.
I don't see any option to do it at runtime, though.
This would also be useful for me. My tests can output file names on failure, and word wrap breaks up those file names across multiple lines so I can no longer ctrl+click to open the file. My preference would be an easy way to turn off word wrapping entirely.
I just spent 2 hours finding seemingly identical string diff in test failure because a space was lost due to line wrapping. would love to have line wrap disabled by default.
This would be great. I don't want my INFO messages to be broken and wrapped at a fixed value.