Correct case of $PSHOME special variable

This commit is contained in:
xtqqczze
2020-01-13 19:35:33 +00:00
parent 2782b73e37
commit e0d2e2aade
28 changed files with 58 additions and 58 deletions
@@ -88,15 +88,15 @@ Describe "Using of ternary operator" -Tags CI {
It "Tab completion for variables assigned with ternary expression should work as expected" {
## Type inference for the ternary expression should aggregate the inferred values from both branches
$text1 = '$var1 = $IsCoreCLR ? (Get-Item $PSHome) : (Get-Process -Id $PID); $var1.Full'
$text1 = '$var1 = $IsCoreCLR ? (Get-Item $PSHOME) : (Get-Process -Id $PID); $var1.Full'
$result = TabExpansion2 -inputScript $text1 -cursorColumn $text1.Length
$result.CompletionMatches[0].CompletionText | Should -BeExactly FullName
$text2 = '$var1 = $IsCoreCLR ? (Get-Item $PSHome) : (Get-Process -Id $PID); $var1.Proce'
$text2 = '$var1 = $IsCoreCLR ? (Get-Item $PSHOME) : (Get-Process -Id $PID); $var1.Proce'
$result = TabExpansion2 -inputScript $text2 -cursorColumn $text2.Length
$result.CompletionMatches[0].CompletionText | Should -BeExactly ProcessName
$text3 = '$IsCoreCLR ? ($var2 = Get-Item $PSHome) : "blah"; $var2.Full'
$text3 = '$IsCoreCLR ? ($var2 = Get-Item $PSHOME) : "blah"; $var2.Full'
$result = TabExpansion2 -inputScript $text3 -cursorColumn $text3.Length
$result.CompletionMatches[0].CompletionText | Should -BeExactly FullName
}
@@ -10,7 +10,7 @@ Describe 'Native pipeline should have proper encoding' -tags 'CI' {
Describe 'native commands with pipeline' -tags 'Feature' {
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "pwsh"
$powershell = Join-Path -Path $PSHOME -ChildPath "pwsh"
}
It "native | ps | native doesn't block" {
@@ -2,7 +2,7 @@
# Licensed under the MIT License.
Describe "Native streams behavior with PowerShell" -Tags 'CI' {
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "pwsh"
$powershell = Join-Path -Path $PSHOME -ChildPath "pwsh"
}
Context "Error stream" {