Skip to content

Commit

Permalink
🎨 ✅ Fix minor test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vexx32 committed Jun 23, 2019
1 parent 15a28bc commit 84402d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/powershell/Language/Parser/Parsing.Tests.ps1
Expand Up @@ -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'
}

#
Expand Down
Expand Up @@ -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' {
Expand All @@ -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 )
}
}

Expand Down

0 comments on commit 84402d1

Please sign in to comment.