Skip to content

Commit 97d5af7

Browse files
committed
PS: Add failing test.
1 parent c93daeb commit 97d5af7

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
param([string]$Source)
1+
param([string]$Source1, [string]$Source2, [string]$Source3, [string]$Source4)
22

3-
Sink $Source # $ hasValueFlow
3+
Sink $Source1 # $ hasValueFlow=1
4+
Sink $Source2 # $ hasValueFlow=2
5+
Sink $Source3 # $ hasValueFlow=3
6+
Sink $Source4 # $ MISSING: hasValueFlow=4

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
models
22
edges
3-
| global.ps1:1:7:1:22 | Source | global.ps1:3:6:3:13 | Source | provenance | |
3+
| global.ps1:1:7:1:23 | Source1 | global.ps1:3:6:3:14 | Source1 | provenance | |
4+
| global.ps1:1:25:1:41 | Source2 | global.ps1:4:6:4:14 | Source2 | provenance | |
5+
| global.ps1:1:43:1:59 | Source3 | global.ps1:5:6:5:14 | Source3 | provenance | |
46
| test.ps1:1:14:1:16 | a | test.ps1:2:10:2:12 | a | provenance | |
57
| test.ps1:5:6:5:16 | Source | test.ps1:6:5:6:7 | x | provenance | |
68
| test.ps1:6:5:6:7 | x | test.ps1:1:14:1:16 | a | provenance | |
@@ -140,8 +142,12 @@ edges
140142
| test.ps1:39:24:39:31 | second | test.ps1:8:24:8:26 | y | provenance | |
141143
| test.ps1:39:32:39:38 | first | test.ps1:8:20:8:22 | x | provenance | |
142144
nodes
143-
| global.ps1:1:7:1:22 | Source | semmle.label | Source |
144-
| global.ps1:3:6:3:13 | Source | semmle.label | Source |
145+
| global.ps1:1:7:1:23 | Source1 | semmle.label | Source1 |
146+
| global.ps1:1:25:1:41 | Source2 | semmle.label | Source2 |
147+
| global.ps1:1:43:1:59 | Source3 | semmle.label | Source3 |
148+
| global.ps1:3:6:3:14 | Source1 | semmle.label | Source1 |
149+
| global.ps1:4:6:4:14 | Source2 | semmle.label | Source2 |
150+
| global.ps1:5:6:5:14 | Source3 | semmle.label | Source3 |
145151
| test.ps1:1:14:1:16 | a | semmle.label | a |
146152
| test.ps1:2:10:2:12 | a | semmle.label | a |
147153
| test.ps1:5:6:5:16 | Source | semmle.label | Source |
@@ -224,7 +230,9 @@ nodes
224230
subpaths
225231
testFailures
226232
#select
227-
| global.ps1:3:6:3:13 | Source | global.ps1:1:7:1:22 | Source | global.ps1:3:6:3:13 | Source | $@ | global.ps1:1:7:1:22 | Source | Source |
233+
| global.ps1:3:6:3:14 | Source1 | global.ps1:1:7:1:23 | Source1 | global.ps1:3:6:3:14 | Source1 | $@ | global.ps1:1:7:1:23 | Source1 | Source1 |
234+
| global.ps1:4:6:4:14 | Source2 | global.ps1:1:25:1:41 | Source2 | global.ps1:4:6:4:14 | Source2 | $@ | global.ps1:1:25:1:41 | Source2 | Source2 |
235+
| global.ps1:5:6:5:14 | Source3 | global.ps1:1:43:1:59 | Source3 | global.ps1:5:6:5:14 | Source3 | $@ | global.ps1:1:43:1:59 | Source3 | Source3 |
228236
| test.ps1:2:10:2:12 | a | test.ps1:5:6:5:16 | Source | test.ps1:2:10:2:12 | a | $@ | test.ps1:5:6:5:16 | Source | Source |
229237
| test.ps1:9:10:9:12 | x | test.ps1:14:10:14:20 | Source | test.ps1:9:10:9:12 | x | $@ | test.ps1:14:10:14:20 | Source | Source |
230238
| test.ps1:10:10:10:12 | y | test.ps1:15:11:15:21 | Source | test.ps1:10:10:10:12 | y | $@ | test.ps1:15:11:15:21 | Source | Source |

0 commit comments

Comments
 (0)