Skip to content

Commit 4276405

Browse files
committed
PS: Add a testcase for the new read step.
1 parent 2ec78ed commit 4276405

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

powershell/ql/test/library-tests/dataflow/fields/test.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ nodes
181181
| test.ps1:89:6:89:12 | b | semmle.label | b |
182182
subpaths
183183
testFailures
184+
| test.ps1:92:13:92:31 | # $ hasValueFlow=18 | Missing result: hasValueFlow=18 |
184185
#select
185186
| test.ps1:4:6:4:9 | f | test.ps1:3:8:3:17 | Call to source | test.ps1:4:6:4:9 | f | $@ | test.ps1:3:8:3:17 | Call to source | Call to source |
186187
| test.ps1:11:6:11:13 | ...[...] | test.ps1:10:12:10:21 | Call to source | test.ps1:11:6:11:13 | ...[...] | $@ | test.ps1:10:12:10:21 | Call to source | Call to source |

powershell/ql/test/library-tests/dataflow/fields/test.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,8 @@ Sink $hash["b"] # clean
8686
$hash["a"] = 0
8787
Sink $hash["a"] # $ SPURIOUS: hasValueFlow=16
8888
$hash.b = Source "17"
89-
Sink $hash.b # $ hasValueFlow=17
89+
Sink $hash.b # $ hasValueFlow=17
90+
91+
foreach($a in 1, 2, (Source "18"), 3) {
92+
Sink $a # $ hasValueFlow=18
93+
}

0 commit comments

Comments
 (0)