Files
codeql/python/ql/test/library-tests/dataflow/variable-capture/CaptureTest.ql

20 lines
540 B
Plaintext

import python
import semmle.python.dataflow.new.DataFlow
import utils.test.InlineExpectationsTest
import utils.test.dataflow.testConfig
module CaptureTest implements TestSig {
string getARelevantTag() { result = "captured" }
predicate hasActualResult(Location location, string element, string tag, string value) {
exists(DataFlow::Node sink | TestFlow::flowTo(sink) |
location = sink.getLocation() and
tag = "captured" and
value = "" and
element = sink.toString()
)
}
}
import MakeTest<CaptureTest>