From dec3e7191c7cc376f8bb5849826b8cb130d499fe Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 16 Oct 2024 20:15:01 +0100 Subject: [PATCH] PS: Add test and accept test changes. --- powershell/ql/test/library-tests/dataflow/params/global.ps1 | 3 +++ .../ql/test/library-tests/dataflow/params/test.expected | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 powershell/ql/test/library-tests/dataflow/params/global.ps1 diff --git a/powershell/ql/test/library-tests/dataflow/params/global.ps1 b/powershell/ql/test/library-tests/dataflow/params/global.ps1 new file mode 100644 index 00000000000..e3850e7715d --- /dev/null +++ b/powershell/ql/test/library-tests/dataflow/params/global.ps1 @@ -0,0 +1,3 @@ +param([string]$Source) + +Sink $Source # $ hasValueFlow \ No newline at end of file diff --git a/powershell/ql/test/library-tests/dataflow/params/test.expected b/powershell/ql/test/library-tests/dataflow/params/test.expected index aa6496a147f..5a477560675 100644 --- a/powershell/ql/test/library-tests/dataflow/params/test.expected +++ b/powershell/ql/test/library-tests/dataflow/params/test.expected @@ -1,5 +1,6 @@ models edges +| global.ps1:1:7:1:22 | Source | global.ps1:3:6:3:13 | Source | provenance | | | test.ps1:1:14:1:16 | a | test.ps1:2:10:2:12 | a | provenance | | | test.ps1:5:6:5:16 | Source | test.ps1:6:5:6:7 | x | provenance | | | test.ps1:6:5:6:7 | x | test.ps1:1:14:1:16 | a | provenance | | @@ -139,6 +140,8 @@ edges | test.ps1:39:24:39:31 | second | test.ps1:8:24:8:26 | y | provenance | | | test.ps1:39:32:39:38 | first | test.ps1:8:20:8:22 | x | provenance | | nodes +| global.ps1:1:7:1:22 | Source | semmle.label | Source | +| global.ps1:3:6:3:13 | Source | semmle.label | Source | | test.ps1:1:14:1:16 | a | semmle.label | a | | test.ps1:2:10:2:12 | a | semmle.label | a | | test.ps1:5:6:5:16 | Source | semmle.label | Source | @@ -221,6 +224,7 @@ nodes subpaths testFailures #select +| 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 | | 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 | | 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 | | 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 |