mirror of
https://github.com/github/codeql.git
synced 2026-08-02 00:13:00 +02:00
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).
12 lines
274 B
Plaintext
12 lines
274 B
Plaintext
/**
|
|
* Regression guard: every corpus regex must parse without leaving any
|
|
* character unaccounted for. Expected output is empty.
|
|
*/
|
|
|
|
import cpp
|
|
import semmle.code.cpp.regex.internal.ParseRegExp
|
|
|
|
from RegExp re, int i
|
|
where re.failedToParse(i)
|
|
select re, i, re.getChar(i)
|