Skip to content

Commit f071da4

Browse files
committed
QL: add test
1 parent 6cd11d2 commit f071da4

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

ql/test/callgraph/Foo.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ module Aliases {
3131
alias0() // <- works
3232
}
3333
}
34+
35+
module Buildins {
36+
predicate replaceAll(string s) { "foo".replaceAll("foo", "bar") = s }
37+
38+
predicate regexpCapture(string s) { "foo".regexpCapture("\\w", 1) = s }
39+
}

ql/test/callgraph/callgraph.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
| Foo.qll:29:5:29:16 | PredicateCall | Foo.qll:26:3:26:32 | ClasslessPredicate alias2 |
77
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:22:3:22:32 | ClasslessPredicate myThing0 |
88
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:24:3:24:32 | ClasslessPredicate alias0 |
9+
| Foo.qll:36:36:36:65 | MemberCall | file://:0:0:0:0 | replaceAll |
10+
| Foo.qll:38:39:38:67 | MemberCall | file://:0:0:0:0 | regexpCapture |

0 commit comments

Comments
 (0)