From 959cbd7467357f7d0284d165c07cd954fc41e792 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 15 Oct 2024 13:36:17 +0100 Subject: [PATCH] PS: Add another failing test with parentheses. --- .../library-tests/dataflow/local/test.expected | 17 ++++++++++++++--- .../test/library-tests/dataflow/local/test.ps1 | 5 ++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/powershell/ql/test/library-tests/dataflow/local/test.expected b/powershell/ql/test/library-tests/dataflow/local/test.expected index 00a54b1754e..49d23b2babf 100644 --- a/powershell/ql/test/library-tests/dataflow/local/test.expected +++ b/powershell/ql/test/library-tests/dataflow/local/test.expected @@ -3,7 +3,7 @@ | test.ps1:1:7:1:13 | Source | test.ps1:1:1:1:13 | ...=... | | test.ps1:2:1:2:9 | Sink | test.ps1:2:1:2:9 | pre-return value for Sink | | test.ps1:2:1:2:9 | Sink | test.ps1:2:1:2:9 | pre-return value for Sink | -| test.ps1:2:1:2:9 | implicit unwrapping of Sink | test.ps1:1:1:11:8 | return value for test.ps1 | +| test.ps1:2:1:2:9 | implicit unwrapping of Sink | test.ps1:1:1:14:8 | return value for test.ps1 | | test.ps1:2:1:2:9 | pre-return value for Sink | test.ps1:2:1:2:9 | implicit unwrapping of Sink | | test.ps1:4:1:4:3 | b | test.ps1:5:4:5:6 | b | | test.ps1:4:6:4:13 | GetBool | test.ps1:4:1:4:3 | b | @@ -14,7 +14,7 @@ | test.ps1:6:11:6:17 | Source | test.ps1:6:5:6:17 | ...=... | | test.ps1:8:1:8:9 | Sink | test.ps1:8:1:8:9 | pre-return value for Sink | | test.ps1:8:1:8:9 | Sink | test.ps1:8:1:8:9 | pre-return value for Sink | -| test.ps1:8:1:8:9 | implicit unwrapping of Sink | test.ps1:1:1:11:8 | return value for test.ps1 | +| test.ps1:8:1:8:9 | implicit unwrapping of Sink | test.ps1:1:1:14:8 | return value for test.ps1 | | test.ps1:8:1:8:9 | pre-return value for Sink | test.ps1:8:1:8:9 | implicit unwrapping of Sink | | test.ps1:10:1:10:3 | c | test.ps1:11:6:11:8 | c | | test.ps1:10:6:10:16 | [...]... | test.ps1:10:1:10:3 | c | @@ -23,5 +23,16 @@ | test.ps1:10:14:10:16 | b | test.ps1:10:6:10:16 | [...]... | | test.ps1:11:1:11:8 | Sink | test.ps1:11:1:11:8 | pre-return value for Sink | | test.ps1:11:1:11:8 | Sink | test.ps1:11:1:11:8 | pre-return value for Sink | -| test.ps1:11:1:11:8 | implicit unwrapping of Sink | test.ps1:1:1:11:8 | return value for test.ps1 | +| test.ps1:11:1:11:8 | implicit unwrapping of Sink | test.ps1:1:1:14:8 | return value for test.ps1 | | test.ps1:11:1:11:8 | pre-return value for Sink | test.ps1:11:1:11:8 | implicit unwrapping of Sink | +| test.ps1:11:6:11:8 | [post] c | test.ps1:13:7:13:9 | c | +| test.ps1:11:6:11:8 | c | test.ps1:13:7:13:9 | c | +| test.ps1:13:1:13:3 | d | test.ps1:14:6:14:8 | d | +| test.ps1:13:6:13:10 | (...) | test.ps1:13:1:13:3 | d | +| test.ps1:13:6:13:10 | (...) | test.ps1:13:1:13:10 | ...=... | +| test.ps1:13:6:13:10 | (...) | test.ps1:13:6:13:10 | (...) | +| test.ps1:13:7:13:9 | c | test.ps1:13:7:13:9 | c | +| test.ps1:14:1:14:8 | Sink | test.ps1:14:1:14:8 | pre-return value for Sink | +| test.ps1:14:1:14:8 | Sink | test.ps1:14:1:14:8 | pre-return value for Sink | +| test.ps1:14:1:14:8 | implicit unwrapping of Sink | test.ps1:1:1:14:8 | return value for test.ps1 | +| test.ps1:14:1:14:8 | pre-return value for Sink | test.ps1:14:1:14:8 | implicit unwrapping of Sink | diff --git a/powershell/ql/test/library-tests/dataflow/local/test.ps1 b/powershell/ql/test/library-tests/dataflow/local/test.ps1 index be250d70927..db527964bbf 100644 --- a/powershell/ql/test/library-tests/dataflow/local/test.ps1 +++ b/powershell/ql/test/library-tests/dataflow/local/test.ps1 @@ -8,4 +8,7 @@ if($b) { Sink $a2 $c = [string]$b -Sink $c \ No newline at end of file +Sink $c + +$d = ($c) +Sink $d \ No newline at end of file