Skip to content

Commit a8de859

Browse files
committed
PS: Add a failing test.
1 parent 7836a09 commit a8de859

File tree

1 file changed

+11
-1
lines changed
  • powershell/ql/test/library-tests/dataflow/pipeline

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,14 @@ function consumeValueFromPipelineByPropertyNameWithoutProcess {
3737
}
3838

3939
$x = Source "8"
40-
[pscustomobject]@{x = $x} | consumeValueFromPipelineByPropertyNameWithoutProcess
40+
[pscustomobject]@{x = $x} | consumeValueFromPipelineByPropertyNameWithoutProcess
41+
42+
function consumeValueFromPipelineByPropertyNameWithProcess {
43+
Param([Parameter(ValueFromPipelineByPropertyName)] $x)
44+
45+
process {
46+
Sink $x # $ MISSING: hasValueFlow=9 hasValueFlow=10 hasValueFlow=11
47+
}
48+
}
49+
50+
[pscustomobject]@{x = Source "9"}, [pscustomobject]@{x = Source "10"}, [pscustomobject]@{x = Source "11"} | consumeValueFromPipelineByPropertyNameWithProcess

0 commit comments

Comments
 (0)