diff --git a/test/powershell/Language/Parser/Parsing.Tests.ps1 b/test/powershell/Language/Parser/Parsing.Tests.ps1 index 1da236e77e..26551f5890 100644 --- a/test/powershell/Language/Parser/Parsing.Tests.ps1 +++ b/test/powershell/Language/Parser/Parsing.Tests.ps1 @@ -161,8 +161,8 @@ Describe 'named blocks parsing' -Tags "CI" { Test-Ast 'begin end' 'begin end' 'begin' 'end' Test-Ast 'begin end process' 'begin end process' 'begin' 'end' 'process' Test-Ast 'begin {} end' 'begin {} end' 'begin {}' 'end' - Test-Ast 'begin process end dispose' 'begin dispose end process' 'begin' 'dispose' 'end' 'process' - Test-Ast 'begin {} process end dispose {}' 'begin {} dispose {} end process' 'begin {}' 'dispose {}' 'end' 'process' + Test-Ast 'begin process end dispose' 'begin process end dispose' 'begin' 'dispose' 'end' 'process' + Test-Ast 'begin {} process end dispose {}' 'begin {} process end dispose {}' 'begin {}' 'dispose {}' 'end' 'process' } # diff --git a/test/powershell/Language/Scripting/PipelineBehaviour.Tests.ps1 b/test/powershell/Language/Scripting/PipelineBehaviour.Tests.ps1 index 8cd56eb810..8e71986498 100644 --- a/test/powershell/Language/Scripting/PipelineBehaviour.Tests.ps1 +++ b/test/powershell/Language/Scripting/PipelineBehaviour.Tests.ps1 @@ -39,7 +39,7 @@ Describe 'Function Pipeline Behaviour' -Tag 'CI' { begin { "BEGIN" } process { "PROCESS $_" } end { "END"; throw "This should not be reached." } - } | Select-Object -First 3 | Should -Be @( "BEGIN", 1, 2 ) + } | Select-Object -First 3 | Should -Be @( "BEGIN", "PROCESS 1", "PROCESS 2" ) } It 'still executes Dispose {} if the pipeline is halted' { @@ -55,9 +55,8 @@ Describe 'Function Pipeline Behaviour' -Tag 'CI' { 1..10 | & { process { $_ } dispose { "DISPOSE" } - } | - Select-Object -First 5 | - Should -Be @( 1, 2, 3, 4, 5 ) + } | Select-Object -First 5 | + Should -Be @( 1, 2, 3, 4, 5 ) } }