catch2/tests/SelfTest
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
..
Baselines Don't include numerically unstable tests in approvals 2024-04-30 19:21:27 +02:00
IntrospectiveTests Handle ANSI escape sequences when performing column wrapping (#2849) 2024-05-04 23:43:52 +02:00
Misc Move tests from projects/ to tests/ 2019-12-05 16:00:20 +01:00
TimingTests Fix references to license file 2022-10-28 11:30:15 +02:00
UsageTests Default StringMaker<FloatingPointType>::precision to max_digits10 2024-04-30 17:18:48 +02:00
helpers Fix & extend tests for comparing const instances of zero lit types 2024-04-08 13:15:35 +02:00
TestRegistrations.cpp Ignore C++98 related compiler warnings 2024-03-12 22:56:37 +01:00