Skip to content

Commit 633ba01

Browse files
authored
Commit 7: Add Consistency.ql regression guard
New cpp/ql/test/library-tests/regex/Consistency.ql selects, for each corpus RegExp, characters that failedToParse. The empty Consistency.expected asserts that no corpus regex has any unparsed character, mirroring PR #22200's Consistency test as the primary regression guard for the parser. Bundle: github/codeql-action codeql-bundle-v2.26.1 (CodeQL CLI 2.26.1).
1 parent bfb7b1d commit 633ba01

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

cpp/ql/test/library-tests/regex/Consistency.expected

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Regression guard: every corpus regex must parse without leaving any
3+
* character unaccounted for. Expected output is empty.
4+
*/
5+
6+
import cpp
7+
import semmle.code.cpp.regex.internal.ParseRegExp
8+
9+
from RegExp re, int i
10+
where re.failedToParse(i)
11+
select re, i, re.getChar(i)

0 commit comments

Comments
 (0)