File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -46,18 +46,15 @@ Describe "Packaging Module Functions" {
4646 $result.PackageIdentifier | Should - Be " com.microsoft.powershell"
4747 }
4848
49- It " Should NOT use package name for preview detection (bug fix verification)" {
49+ It " Should NOT use package name for preview detection (bug fix verification) - <Name>" - TestCases @ (
50+ @ { Version = " 7.6.0-preview.6" ; Name = " Preview" }
51+ @ { Version = " 7.6.0-rc.1" ; Name = " RC" }
52+ ) {
5053 # This test verifies the fix for issue #26673
5154 # The bug was using ($Name -like '*-preview') which always returned false
5255 # because preview builds use Name="powershell" not "powershell-preview"
53-
54- $Version = " 7.6.0-preview.6"
55- $Name = " powershell" # Preview builds use "powershell" not "powershell-preview"
56-
57- # The INCORRECT logic (the bug): $Name -like '*-preview'
58- $incorrectCheck = $Name -like ' *-preview'
59- $incorrectCheck | Should - Be $false - Because " Package name is 'powershell' not 'powershell-preview'"
60-
56+ param ($Version )
57+
6158 # The CORRECT logic (the fix): uses version string
6259 $result = Get-MacOSPackageIdentifierInfo - Version $Version - LTS:$false
6360 $result.IsPreview | Should - Be $true - Because " Version string correctly identifies preview"
You can’t perform that action at this time.
0 commit comments