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
This commit is contained in:
Martin Hořeňovský
2020-04-12 18:44:42 +02:00
parent 035a062596
commit 5d32ce26f4
9 changed files with 96 additions and 9 deletions

View File

@@ -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;
}