diff --git a/python/ql/test/library-tests/regex/Alternation.ql b/python/ql/test/library-tests/regex/Alternation.ql index d172e778943..a47f016a399 100644 --- a/python/ql/test/library-tests/regex/Alternation.ql +++ b/python/ql/test/library-tests/regex/Alternation.ql @@ -1,7 +1,7 @@ import python import semmle.python.regex -from Regex r, int start, int end, int part_start, int part_end +from RegExp r, int start, int end, int part_start, int part_end where r.getLocation().getFile().getBaseName() = "test.py" and r.alternationOption(start, end, part_start, part_end) diff --git a/python/ql/test/library-tests/regex/Characters.ql b/python/ql/test/library-tests/regex/Characters.ql index 1444c37cd57..4a570acfbd9 100644 --- a/python/ql/test/library-tests/regex/Characters.ql +++ b/python/ql/test/library-tests/regex/Characters.ql @@ -6,6 +6,6 @@ import python import semmle.python.regex -from Regex r, int start, int end +from RegExp r, int start, int end where r.character(start, end) and r.getLocation().getFile().getBaseName() = "test.py" select r.getText(), start, end diff --git a/python/ql/test/library-tests/regex/Consistency.ql b/python/ql/test/library-tests/regex/Consistency.ql index 26e0a1cbfb5..2432a36d870 100644 --- a/python/ql/test/library-tests/regex/Consistency.ql +++ b/python/ql/test/library-tests/regex/Consistency.ql @@ -7,6 +7,6 @@ import semmle.python.regex from string str, Location loc, int counter where - counter = strictcount(Regex term | term.getLocation() = loc and term.getText() = str) and + counter = strictcount(RegExp term | term.getLocation() = loc and term.getText() = str) and counter > 1 select str, counter, loc diff --git a/python/ql/test/library-tests/regex/FirstLast.ql b/python/ql/test/library-tests/regex/FirstLast.ql index 5bca6fdf542..b0882faf61a 100644 --- a/python/ql/test/library-tests/regex/FirstLast.ql +++ b/python/ql/test/library-tests/regex/FirstLast.ql @@ -1,12 +1,12 @@ import python import semmle.python.regex -predicate part(Regex r, int start, int end, string kind) { +predicate part(RegExp r, int start, int end, string kind) { r.lastItem(start, end) and kind = "last" or r.firstItem(start, end) and kind = "first" } -from Regex r, int start, int end, string kind +from RegExp r, int start, int end, string kind where part(r, start, end, kind) and r.getLocation().getFile().getBaseName() = "test.py" select r.getText(), kind, start, end diff --git a/python/ql/test/library-tests/regex/GroupContents.ql b/python/ql/test/library-tests/regex/GroupContents.ql index 221edbe44ba..ddefebb9c55 100644 --- a/python/ql/test/library-tests/regex/GroupContents.ql +++ b/python/ql/test/library-tests/regex/GroupContents.ql @@ -1,7 +1,7 @@ import python import semmle.python.regex -from Regex r, int start, int end, int part_start, int part_end +from RegExp r, int start, int end, int part_start, int part_end where r.getLocation().getFile().getBaseName() = "test.py" and r.groupContents(start, end, part_start, part_end) diff --git a/python/ql/test/library-tests/regex/Mode.ql b/python/ql/test/library-tests/regex/Mode.ql index 62449fbb330..b369018fff0 100644 --- a/python/ql/test/library-tests/regex/Mode.ql +++ b/python/ql/test/library-tests/regex/Mode.ql @@ -1,6 +1,6 @@ import python import semmle.python.regex -from Regex r +from RegExp r where r.getLocation().getFile().getBaseName() = "test.py" select r.getLocation().getStartLine(), r.getAMode() diff --git a/python/ql/test/library-tests/regex/Qualified.ql b/python/ql/test/library-tests/regex/Qualified.ql index 26400b3440f..c40eaca0d68 100644 --- a/python/ql/test/library-tests/regex/Qualified.ql +++ b/python/ql/test/library-tests/regex/Qualified.ql @@ -1,7 +1,7 @@ import python import semmle.python.regex -from Regex r, int start, int end, boolean maybe_empty, boolean may_repeat_forever +from RegExp r, int start, int end, boolean maybe_empty, boolean may_repeat_forever where r.getLocation().getFile().getBaseName() = "test.py" and r.qualifiedItem(start, end, maybe_empty, may_repeat_forever) diff --git a/python/ql/test/library-tests/regex/Regex.ql b/python/ql/test/library-tests/regex/Regex.ql index 4c799ac2574..9c390474778 100644 --- a/python/ql/test/library-tests/regex/Regex.ql +++ b/python/ql/test/library-tests/regex/Regex.ql @@ -1,7 +1,7 @@ import python import semmle.python.regex -predicate part(Regex r, int start, int end, string kind) { +predicate part(RegExp r, int start, int end, string kind) { r.alternation(start, end) and kind = "choice" or r.normalCharacter(start, end) and kind = "char" @@ -23,6 +23,6 @@ predicate part(Regex r, int start, int end, string kind) { r.qualifiedItem(start, end, _, _) and kind = "qualified" } -from Regex r, int start, int end, string kind +from RegExp r, int start, int end, string kind where part(r, start, end, kind) and r.getLocation().getFile().getBaseName() = "test.py" select r.getText(), kind, start, end diff --git a/python/ql/test/library-tests/regex/SubstructureTests.ql b/python/ql/test/library-tests/regex/SubstructureTests.ql index cba3e56d08c..e189c13b15e 100644 --- a/python/ql/test/library-tests/regex/SubstructureTests.ql +++ b/python/ql/test/library-tests/regex/SubstructureTests.ql @@ -10,7 +10,7 @@ class CharacterSetTest extends InlineExpectationsTest { override predicate hasActualResult(Location location, string element, string tag, string value) { exists(location.getFile().getRelativePath()) and location.getFile().getBaseName() = "charSetTest.py" and - exists(Regex re, int start, int end | + exists(RegExp re, int start, int end | re.charSet(start, end) and location = re.getLocation() and element = re.getText().substring(start, end) and @@ -28,7 +28,7 @@ class CharacterRangeTest extends InlineExpectationsTest { override predicate hasActualResult(Location location, string element, string tag, string value) { exists(location.getFile().getRelativePath()) and location.getFile().getBaseName() = "charRangeTest.py" and - exists(Regex re, int start, int lower_end, int upper_start, int end | + exists(RegExp re, int start, int lower_end, int upper_start, int end | re.charRange(_, start, lower_end, upper_start, end) and location = re.getLocation() and element = re.getText().substring(start, end) and @@ -46,7 +46,7 @@ class EscapeTest extends InlineExpectationsTest { override predicate hasActualResult(Location location, string element, string tag, string value) { exists(location.getFile().getRelativePath()) and location.getFile().getBaseName() = "escapedCharacterTest.py" and - exists(Regex re, int start, int end | + exists(RegExp re, int start, int end | re.escapedCharacter(start, end) and location = re.getLocation() and element = re.getText().substring(start, end) and @@ -64,7 +64,7 @@ class GroupTest extends InlineExpectationsTest { override predicate hasActualResult(Location location, string element, string tag, string value) { exists(location.getFile().getRelativePath()) and location.getFile().getBaseName() = "groupTest.py" and - exists(Regex re, int start, int end | + exists(RegExp re, int start, int end | re.group(start, end) and location = re.getLocation() and element = re.getText().substring(start, end) and