catch2/tests
Jeremy Rifkin 8ce2426e53
Handle ANSI escape sequences when performing column wrapping (#2849)
This PR adds functionality to skip around ANSI escape sequences in catch_textflow so they do not contribute to line length and line wrapping code does not split escape sequences in the middle. I've implemented this by creating a AnsiSkippingString abstraction that has a bidirectional iterator that can skip around escape sequences while iterating. Additionally I refactored Column::const_iterator to be iterator-based rather than index-based so this abstraction is a simple drop-in for std::string.

Currently only color sequences are handled, other escape sequences are left unaffected.

Motivation: Text with ANSI color sequences gets messed up when being output by Catch2 #2833.
2024-05-04 23:43:52 +02:00
..
ExtraTests Add test for handleFatalErrorCondition within JUnit reporter 2024-04-21 21:52:33 +02:00
SelfTest Handle ANSI escape sequences when performing column wrapping (#2849) 2024-05-04 23:43:52 +02:00
TestScripts Allow CATCH_CONFIG_DEFAULT_REPORTER to be arbitrary reporter spec 2024-03-27 10:03:51 +01:00
BUILD.bazel add bazel build rule for SelfTest (#2857) 2024-04-21 21:05:55 +02:00
CMakeLists.txt Stop repeating conditional in endif() 2024-03-12 22:55:12 +01:00
meson.build Add helpers for implementing uniform integer distribution 2023-12-10 19:53:36 +01:00