diff options
| author | Martin Hořeňovský | 2020-04-12 18:44:42 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-04-12 18:48:52 +0200 |
| commit | 5d32ce26f4c18588f9eac3342aea122a38b8fed3 (patch) | |
| tree | c08dd88f03e021e0638c6977ebf0ee5787b8908f /include/internal/catch_test_spec_parser.cpp | |
| parent | 035a0625964a2db0252719904f581d1072d691a1 (diff) | |
| download | catch3-5d32ce26f4c18588f9eac3342aea122a38b8fed3.tar.gz | |
Fix bug in test spec parser handling of escaping in ORed patterns
It did not clear out all of its internal state when switching from
one pattern to another, so when it should've escaped `,`, it took
its position from its position in the original user-provided string,
rather than its position in the current pattern.
Fixes #1905
Diffstat (limited to 'include/internal/catch_test_spec_parser.cpp')
| -rw-r--r-- | include/internal/catch_test_spec_parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/internal/catch_test_spec_parser.cpp b/include/internal/catch_test_spec_parser.cpp index dad15c01..40fcdcc3 100644 --- a/include/internal/catch_test_spec_parser.cpp +++ b/include/internal/catch_test_spec_parser.cpp @@ -168,6 +168,7 @@ namespace Catch { m_pos = m_arg.size(); m_substring.clear(); m_patternName.clear(); + m_realPatternPos = 0; return false; } endMode(); @@ -186,6 +187,7 @@ namespace Catch { } m_patternName.clear(); + m_realPatternPos = 0; return token; } |