Skip to content

Commit 831f25d

Browse files
committed
PS: Add test for forEach.
1 parent ca2cf5e commit 831f25d

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

powershell/ql/test/library-tests/controlflow/elements.expected

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import semmle.code.powershell.controlflow.CfgNodes
2+
import ExprNodes
3+
import StmtNodes
4+
5+
query predicate forEach(ForEachStmtCfgNode forEach, ExprCfgNode va, ExprCfgNode iterable, StmtCfgNode body) {
6+
va = forEach.getVarAccess() and
7+
iterable = forEach.getIterableExpr() and
8+
body = forEach.getBody()
9+
}

0 commit comments

Comments
 (0)