rename away from deprecated alias in test-files

This commit is contained in:
erik-krogh
2023-03-21 11:53:58 +01:00
parent f2adc4f958
commit ffa3425195
9 changed files with 14 additions and 14 deletions

View File

@@ -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)

View File

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

View File

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

View File

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

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)

View File

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

View File

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