test(installer): check the resolved command after installation

This commit is contained in:
drakezhang
2026-09-09 19:36:10 +08:00
parent 358e42196a
commit 2cd953297a
+2 -2
View File
@@ -233,10 +233,10 @@ try {
$env:PROCESSOR_ARCHITEW6432 = $null $env:PROCESSOR_ARCHITEW6432 = $null
$script:UserPath = "$targetDir;$InstallDir;$($InstallDir.ToUpperInvariant())" $script:UserPath = "$targetDir;$InstallDir;$($InstallDir.ToUpperInvariant())"
$env:PATH = "$targetDir;$InstallDir;$oldPath" $env:PATH = "$targetDir;$InstallDir;$oldPath"
Assert-Equal (Get-Command bsk -CommandType Application).Source $target Assert-Equal (Get-Command bsk).Source $target
Main Main
Assert-Equal $downloads.Count 1 Assert-Equal $downloads.Count 1
Assert-Equal (Get-Command bsk -CommandType Application).Source $installed Assert-Equal (Get-Command bsk).Source $installed
Assert-Equal $script:UserPath "$InstallDir;$targetDir" Assert-Equal $script:UserPath "$InstallDir;$targetDir"
Assert-Equal (Get-FileHash -LiteralPath $installed).Hash (Get-FileHash -LiteralPath $source).Hash Assert-Equal (Get-FileHash -LiteralPath $installed).Hash (Get-FileHash -LiteralPath $source).Hash
Assert-Equal @(Get-ChildItem -LiteralPath $fixtureTemp -Force).Count 0 Assert-Equal @(Get-ChildItem -LiteralPath $fixtureTemp -Force).Count 0