Skip to content

Commit ca1c912

Browse files
committed
PS: Add test with missing flow.
1 parent 68b74f8 commit ca1c912

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

  • powershell/ql/test/library-tests/dataflow/fields

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,18 @@ $arr9 = @(0, 1, $y)
4444
Sink $arr9[0] # clean
4545
Sink $arr9[1] # clean
4646
Sink $arr9[2] # $ MISSING: hasValueFlow=11
47-
Sink $arr9[$unknown] # MISSING: hasValueFlow=11
47+
Sink $arr9[$unknown] # MISSING: hasValueFlow=11
48+
49+
class MyClass {
50+
[string] $field
51+
52+
[void]callSink() {
53+
Sink $this.field # $ MISSING: hasValueFlow=12
54+
}
55+
}
56+
57+
$myClass = [MyClass]::new()
58+
59+
$myClass.field = Source "12"
60+
61+
$myClass.callSink()

0 commit comments

Comments
 (0)