Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fixed test spec parser issue

- multiple specs in a single string, with escapes in each were erroring out
Commit
d2a59ad37b21c0b56689ad09d2418948ffd9bd29
Author
Phil Nash ·
Parents
10dfca34ac6d

Files · Download .tar.gz

Changes

 include/internal/catch_test_spec_parser.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/internal/catch_test_spec_parser.hpp b/include/internal/catch_test_spec_parser.hpp
index 0c328365..05bdcf4c 100644
--- a/include/internal/catch_test_spec_parser.hpp
+++ b/include/internal/catch_test_spec_parser.hpp
@@ -97,7 +97,7 @@ namespace Catch {
         void addPattern() {
             std::string token = subString();
             for( size_t i = 0; i < m_escapeChars.size(); ++i )
-                token = token.substr( 0, m_escapeChars[i]-i ) + token.substr( m_escapeChars[i]+1-i );
+                token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
             m_escapeChars.clear();
             if( startsWith( token, "exclude:" ) ) {
                 m_exclusion = true;