fix(release): remove environment-dependent alias fixture

This commit is contained in:
程序员阿江(Relakkes) 2026-07-18 20:25:42 +08:00
parent f8cccb096f
commit 100a2b25b8
2 changed files with 1 additions and 15 deletions

View File

@ -790,20 +790,6 @@ function Run-SelfTest {
}
Assert-SelfTest -Condition $possibleShortAliasFailed -Message 'possible 8.3 alias did not fail closed'
$existingShortAlias = Join-Path ([IO.Path]::GetPathRoot($testRoot)) 'PROGRA~1'
if ([IO.Directory]::Exists($existingShortAlias) -or [IO.File]::Exists($existingShortAlias)) {
$existingShortAliasFailed = $false
try {
Resolve-CanonicalPath -Path $existingShortAlias | Out-Null
} catch {
$existingShortAliasFailed = (
$_.Exception.Message.Contains('Alternate path alias') -or
$_.Exception.Message.Contains('8.3 path alias')
)
}
Assert-SelfTest -Condition $existingShortAliasFailed -Message 'existing 8.3 alias did not fail closed'
}
$legalTildePath = Join-Path $testRoot 'project~notes'
New-Item -ItemType Directory -Path $legalTildePath | Out-Null
$resolvedLegalTildePath = Resolve-CanonicalPath -Path $legalTildePath

View File

@ -23,8 +23,8 @@ describe('Windows installer recovery prerequisites', () => {
expect(recoveryHelper).toContain("([string]$_.Name).Equals($segment")
expect(recoveryHelper).toContain("Join-Path $testRoot 'project~notes'")
expect(recoveryHelper).toContain("Join-Path $testRoot 'MISSIN~1'")
expect(recoveryHelper).not.toContain("'PROGRA~1'")
expect(recoveryHelper).toContain('possible 8.3 alias did not fail closed')
expect(recoveryHelper).toContain('existing 8.3 alias did not fail closed')
expect(recoveryHelper).toContain('legal long directory name containing a tilde')
expect(recoveryHelper).toContain('extended volume alias did not fail closed')
expect(recoveryHelper).toContain('SUBST alias did not fail closed')