mirror of
https://github.com/github/codeql.git
synced 2026-07-31 15:33:00 +02:00
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).
This commit is contained in:
committed by
GitHub
parent
bfb7b1d046
commit
633ba01b77
11
cpp/ql/test/library-tests/regex/Consistency.ql
Normal file
11
cpp/ql/test/library-tests/regex/Consistency.ql
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 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)
|
||||
Reference in New Issue
Block a user