mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-18 05:05:36 +00:00
Correct case of $PSHOME special variable
This commit is contained in:
1 parent
2782b73e37
commit
e0d2e2aade
28 files changed
+58
-58
No files matched your search
@@ -24,7 +24,7 @@ Describe "Get-FileHash" -Tags "CI" {
|
||||
}
|
||||
|
||||
It "Should write non-terminating error if argument is a folder" {
|
||||
$result = $pshome, "${pshome}\pwsh.dll" | Get-FileHash -ErrorVariable errorVariable
|
||||
$result = $PSHOME, "${pshome}\pwsh.dll" | Get-FileHash -ErrorVariable errorVariable
|
||||
$result.Count | Should -Be 1
|
||||
$errorVariable.FullyQualifiedErrorId | Should -BeExactly "UnauthorizedAccessError,Microsoft.PowerShell.Commands.GetFileHashCommand"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
$ps = Join-Path -Path $PsHome -ChildPath "pwsh"
|
||||
$ps = Join-Path -Path $PSHOME -ChildPath "pwsh"
|
||||
|
||||
Describe "Set-PSBreakpoint DRT Unit Tests" -Tags "CI" {
|
||||
#Set up
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Describe "Write-Host with default Console Host" -Tags "Slow","Feature" {
|
||||
|
||||
BeforeAll {
|
||||
$powershell = Join-Path -Path $PsHome -ChildPath "pwsh"
|
||||
$powershell = Join-Path -Path $PSHOME -ChildPath "pwsh"
|
||||
|
||||
$testData = @(
|
||||
@{ Name = '-Separator'; Command = "Write-Host a,b,c -Separator '+'"; returnCount = 1; returnValue = @("a+b+c") }
|
||||
|
||||
@@ -106,7 +106,7 @@ Describe "XmlCommand DRT basic functionality Tests" -Tags "CI" {
|
||||
|
||||
It "Import-Clixml should work with XML serialization from pwsh.exe" {
|
||||
# need to create separate process so that current powershell doesn't interpret clixml output
|
||||
Start-Process -FilePath $pshome\pwsh -RedirectStandardOutput $testfile -Args "-noprofile -nologo -outputformat xml -command get-command import-clixml" -Wait
|
||||
Start-Process -FilePath $PSHOME\pwsh -RedirectStandardOutput $testfile -Args "-noprofile -nologo -outputformat xml -command get-command import-clixml" -Wait
|
||||
$out = Import-Clixml -Path $testfile
|
||||
$out.Name | Should -Be "Import-CliXml"
|
||||
$out.CommandType.ToString() | Should -Be "Cmdlet"
|
||||
|
||||
@@ -69,11 +69,11 @@ Describe "String cmdlets" -Tags "CI" {
|
||||
It "match object supports RelativePath method" {
|
||||
$file = "Modules${sep}Microsoft.PowerShell.Utility${sep}Microsoft.PowerShell.Utility.psd1"
|
||||
|
||||
$match = Select-String CmdletsToExport $pshome/$file
|
||||
$match = Select-String CmdletsToExport $PSHOME/$file
|
||||
|
||||
$match.RelativePath($pshome) | Should -Be $file
|
||||
$match.RelativePath($pshome.ToLower()) | Should -Be $file
|
||||
$match.RelativePath($pshome.ToUpper()) | Should -Be $file
|
||||
$match.RelativePath($PSHOME) | Should -Be $file
|
||||
$match.RelativePath($PSHOME.ToLower()) | Should -Be $file
|
||||
$match.RelativePath($PSHOME.ToUpper()) | Should -Be $file
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user