Skip to content

Commit 03ada6e

Browse files
committed
Python: Add concept test for SqlConstruction
1 parent ed5a386 commit 03ada6e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

python/ql/test/experimental/meta/ConceptsTest.qll

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,24 @@ class CodeExecutionTest extends InlineExpectationsTest {
128128
}
129129
}
130130

131+
class SqlConstructionTest extends InlineExpectationsTest {
132+
SqlConstructionTest() { this = "SqlConstructionTest" }
133+
134+
override string getARelevantTag() { result = "constructedSql" }
135+
136+
override predicate hasActualResult(Location location, string element, string tag, string value) {
137+
exists(location.getFile().getRelativePath()) and
138+
exists(SqlConstruction e, DataFlow::Node sql |
139+
exists(location.getFile().getRelativePath()) and
140+
sql = e.getSql() and
141+
location = e.getLocation() and
142+
element = sql.toString() and
143+
value = prettyNodeForInlineTest(sql) and
144+
tag = "constructedSql"
145+
)
146+
}
147+
}
148+
131149
class SqlExecutionTest extends InlineExpectationsTest {
132150
SqlExecutionTest() { this = "SqlExecutionTest" }
133151

0 commit comments

Comments
 (0)