Skip to content

Commit c6b1a22

Browse files
committed
Fix test logic
1 parent b6ca72d commit c6b1a22

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/pester/Syntax.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ You need to run python tests first to make it work.
3232
#Write-Host "SublimeText scope $($stScopes[$stIndex])"
3333

3434
if (-not (Test-ScopeInclosure $_ $stScopes[$stIndex])) {
35-
#Write-Warning "PowerShell scope not found in SublimeText scopes $_ "
35+
Write-Host "PowerShell scope not found in SublimeText scopes $_ "
3636
if (-not (Test-ScopeDisclosure $_ $stScopes[$stIndex])) {
37-
Write-Error "PowerShell scope $_ overlap with SublimeText scope $($stScopes[$stIndex]) "
37+
Write-Warning "PowerShell scope $_ overlap with SublimeText scope $($stScopes[$stIndex]) "
3838
$false | Should be $true
3939
}
4040
}

tests/pester/SyntaxHelper.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ function Test-ScopeDisclosure
8585
$rightScope
8686
)
8787

88-
if ($leftScope.startOffset -le $rightScope.endOffset)
88+
if ($leftScope.endOffset -le $rightScope.startOffset)
8989
{
9090
return $true
9191
}
9292

93-
if ($leftScope.endOffset -ge $rightScope.endOffset)
93+
if ($leftScope.startOffset -ge $rightScope.endOffset)
9494
{
9595
return $false
9696
}

0 commit comments

Comments
 (0)