PS: Add tests.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-09-24 16:53:56 +01:00
parent f51e0b0133
commit 1ce4c2fcbf
3 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
models
edges
nodes
subpaths
testFailures
#select

View File

@@ -0,0 +1,6 @@
$a.f = Source "1"
Sink $a.f # $ MISSING: hasValueFlow=1
$a.f = Source "2"
$a.f = 0
Sink $a.f # clean

View File

@@ -0,0 +1,13 @@
/**
* @kind path-problem
*/
import powershell
import semmle.code.powershell.dataflow.DataFlow
private import TestUtilities.InlineFlowTest
import DefaultFlowTest
import ValueFlow::PathGraph
from ValueFlow::PathNode source, ValueFlow::PathNode sink
where ValueFlow::flowPath(source, sink)
select sink, source, sink, "$@", source, source.toString()