Skip to content

Commit 869c613

Browse files
committed
PS: Add tests for the new summary models.
1 parent 8d3f6b8 commit 869c613

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

powershell/ql/test/library-tests/dataflow/mad/flow.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ subpaths
5454
| test.ps1:7:6:7:11 | ...,... [element 0] | file://:0:0:0:0 | [summary param] pipeline in microsoft.powershell.utility!;Method[join-string] [element 0] | file://:0:0:0:0 | [summary] to write: ReturnValue in microsoft.powershell.utility!;Method[join-string] | test.ps1:7:15:7:25 | Call to join-string |
5555
| test.ps1:7:6:7:11 | ...,... [element 1] | file://:0:0:0:0 | [summary param] pipeline in microsoft.powershell.utility!;Method[join-string] [element 1] | file://:0:0:0:0 | [summary] to write: ReturnValue in microsoft.powershell.utility!;Method[join-string] | test.ps1:7:15:7:25 | Call to join-string |
5656
testFailures
57+
| test.ps1:11:10:11:27 | # $ hasTaintFlow=2 | Missing result: hasTaintFlow=2 |
58+
| test.ps1:14:10:14:27 | # $ hasTaintFlow=2 | Missing result: hasTaintFlow=2 |
59+
| test.ps1:17:10:17:27 | # $ hasTaintFlow=2 | Missing result: hasTaintFlow=2 |
60+
| test.ps1:20:10:20:27 | # $ hasTaintFlow=2 | Missing result: hasTaintFlow=2 |
61+
| test.ps1:23:10:23:27 | # $ hasTaintFlow=2 | Missing result: hasTaintFlow=2 |
62+
| test.ps1:26:10:26:27 | # $ hasTaintFlow=2 | Missing result: hasTaintFlow=2 |
63+
| test.ps1:29:10:29:27 | # $ hasTaintFlow=2 | Missing result: hasTaintFlow=2 |
5764
#select
5865
| test.ps1:3:6:3:7 | y | test.ps1:1:6:1:15 | Call to source | test.ps1:3:6:3:7 | y | $@ | test.ps1:1:6:1:15 | Call to source | Call to source |
5966
| test.ps1:8:6:8:7 | z | test.ps1:5:6:5:15 | Call to source | test.ps1:8:6:8:7 | z | $@ | test.ps1:5:6:5:15 | Call to source | Call to source |

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,25 @@ Sink $y # $ hasTaintFlow=1
55
$x = Source "2"
66
$y = Source "3"
77
$z = $x, $y | Join-String
8-
Sink $z # $ hasTaintFlow=2 hasTaintFlow=3
8+
Sink $z # $ hasTaintFlow=2 hasTaintFlow=3
9+
10+
$z1 = Join-Path -Path $x ""
11+
Sink $z1 # $ hasTaintFlow=2
12+
13+
$z2 = Join-Path -ChildPath $x ""
14+
Sink $z2 # $ hasTaintFlow=2
15+
16+
$z3 = Join-Path -AdditionalChildPath $x ""
17+
Sink $z3 # $ hasTaintFlow=2
18+
19+
$z4 = Join-Path $x
20+
Sink $z4 # $ hasTaintFlow=2
21+
22+
$z5 = Join-Path "" $x
23+
Sink $z5 # $ hasTaintFlow=2
24+
25+
$z6 = Join-Path "" "" $x
26+
Sink $z6 # $ hasTaintFlow=2
27+
28+
$z7 = [System.IO.Path]::GetFullPath($x)
29+
Sink $z7 # $ hasTaintFlow=2

0 commit comments

Comments
 (0)