Skip to content

Commit ffa3425

Browse files
committed
rename away from deprecated alias in test-files
1 parent f2adc4f commit ffa3425

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

python/ql/test/library-tests/regex/Alternation.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import python
22
import semmle.python.regex
33

4-
from Regex r, int start, int end, int part_start, int part_end
4+
from RegExp r, int start, int end, int part_start, int part_end
55
where
66
r.getLocation().getFile().getBaseName() = "test.py" and
77
r.alternationOption(start, end, part_start, part_end)

python/ql/test/library-tests/regex/Characters.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
import python
77
import semmle.python.regex
88

9-
from Regex r, int start, int end
9+
from RegExp r, int start, int end
1010
where r.character(start, end) and r.getLocation().getFile().getBaseName() = "test.py"
1111
select r.getText(), start, end

python/ql/test/library-tests/regex/Consistency.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ import semmle.python.regex
77

88
from string str, Location loc, int counter
99
where
10-
counter = strictcount(Regex term | term.getLocation() = loc and term.getText() = str) and
10+
counter = strictcount(RegExp term | term.getLocation() = loc and term.getText() = str) and
1111
counter > 1
1212
select str, counter, loc
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import python
22
import semmle.python.regex
33

4-
predicate part(Regex r, int start, int end, string kind) {
4+
predicate part(RegExp r, int start, int end, string kind) {
55
r.lastItem(start, end) and kind = "last"
66
or
77
r.firstItem(start, end) and kind = "first"
88
}
99

10-
from Regex r, int start, int end, string kind
10+
from RegExp r, int start, int end, string kind
1111
where part(r, start, end, kind) and r.getLocation().getFile().getBaseName() = "test.py"
1212
select r.getText(), kind, start, end

python/ql/test/library-tests/regex/GroupContents.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import python
22
import semmle.python.regex
33

4-
from Regex r, int start, int end, int part_start, int part_end
4+
from RegExp r, int start, int end, int part_start, int part_end
55
where
66
r.getLocation().getFile().getBaseName() = "test.py" and
77
r.groupContents(start, end, part_start, part_end)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import python
22
import semmle.python.regex
33

4-
from Regex r
4+
from RegExp r
55
where r.getLocation().getFile().getBaseName() = "test.py"
66
select r.getLocation().getStartLine(), r.getAMode()

python/ql/test/library-tests/regex/Qualified.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import python
22
import semmle.python.regex
33

4-
from Regex r, int start, int end, boolean maybe_empty, boolean may_repeat_forever
4+
from RegExp r, int start, int end, boolean maybe_empty, boolean may_repeat_forever
55
where
66
r.getLocation().getFile().getBaseName() = "test.py" and
77
r.qualifiedItem(start, end, maybe_empty, may_repeat_forever)

python/ql/test/library-tests/regex/Regex.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import python
22
import semmle.python.regex
33

4-
predicate part(Regex r, int start, int end, string kind) {
4+
predicate part(RegExp r, int start, int end, string kind) {
55
r.alternation(start, end) and kind = "choice"
66
or
77
r.normalCharacter(start, end) and kind = "char"
@@ -23,6 +23,6 @@ predicate part(Regex r, int start, int end, string kind) {
2323
r.qualifiedItem(start, end, _, _) and kind = "qualified"
2424
}
2525

26-
from Regex r, int start, int end, string kind
26+
from RegExp r, int start, int end, string kind
2727
where part(r, start, end, kind) and r.getLocation().getFile().getBaseName() = "test.py"
2828
select r.getText(), kind, start, end

python/ql/test/library-tests/regex/SubstructureTests.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class CharacterSetTest extends InlineExpectationsTest {
1010
override predicate hasActualResult(Location location, string element, string tag, string value) {
1111
exists(location.getFile().getRelativePath()) and
1212
location.getFile().getBaseName() = "charSetTest.py" and
13-
exists(Regex re, int start, int end |
13+
exists(RegExp re, int start, int end |
1414
re.charSet(start, end) and
1515
location = re.getLocation() and
1616
element = re.getText().substring(start, end) and
@@ -28,7 +28,7 @@ class CharacterRangeTest extends InlineExpectationsTest {
2828
override predicate hasActualResult(Location location, string element, string tag, string value) {
2929
exists(location.getFile().getRelativePath()) and
3030
location.getFile().getBaseName() = "charRangeTest.py" and
31-
exists(Regex re, int start, int lower_end, int upper_start, int end |
31+
exists(RegExp re, int start, int lower_end, int upper_start, int end |
3232
re.charRange(_, start, lower_end, upper_start, end) and
3333
location = re.getLocation() and
3434
element = re.getText().substring(start, end) and
@@ -46,7 +46,7 @@ class EscapeTest extends InlineExpectationsTest {
4646
override predicate hasActualResult(Location location, string element, string tag, string value) {
4747
exists(location.getFile().getRelativePath()) and
4848
location.getFile().getBaseName() = "escapedCharacterTest.py" and
49-
exists(Regex re, int start, int end |
49+
exists(RegExp re, int start, int end |
5050
re.escapedCharacter(start, end) and
5151
location = re.getLocation() and
5252
element = re.getText().substring(start, end) and
@@ -64,7 +64,7 @@ class GroupTest extends InlineExpectationsTest {
6464
override predicate hasActualResult(Location location, string element, string tag, string value) {
6565
exists(location.getFile().getRelativePath()) and
6666
location.getFile().getBaseName() = "groupTest.py" and
67-
exists(Regex re, int start, int end |
67+
exists(RegExp re, int start, int end |
6868
re.group(start, end) and
6969
location = re.getLocation() and
7070
element = re.getText().substring(start, end) and

0 commit comments

Comments
 (0)