mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Update PSVersionTable tests for PSEdition
This commit is contained in:
1 parent
615eca6fd5
commit
4feb665203
1 file changed
+15
-2
@@ -1,11 +1,11 @@
|
||||
Describe "PSVersionTable" {
|
||||
It "Should have version table entries" {
|
||||
$PSVersionTable.Count | Should BeGreaterThan 6
|
||||
$PSVersionTable.Count | Should Be 8
|
||||
}
|
||||
|
||||
It "Should have the right version table entries" {
|
||||
|
||||
$PSVersionTable.ContainsKey("PSVersion") | Should Be True
|
||||
$PSVersionTable.ContainsKey("PSEdition") | Should Be True
|
||||
$PSVersionTable.ContainsKey("WSManStackVersion") | Should Be True
|
||||
$PSVersionTable.ContainsKey("SerializationVersion") | Should Be True
|
||||
$PSVersionTable.ContainsKey("CLRVersion") | Should Be True
|
||||
@@ -14,4 +14,17 @@
|
||||
$PSVersionTable.ContainsKey("PSRemotingProtocolVersion") | Should Be True
|
||||
|
||||
}
|
||||
|
||||
It "Should have the correct edition" -Skip:(!$IsCore) {
|
||||
$expected =
|
||||
if ($IsLinux -Or $IsOSX) {
|
||||
"Linux"
|
||||
} elseif ($IsWindows) {
|
||||
"Core"
|
||||
} else {
|
||||
throw [PlatformNotSupportedException]
|
||||
}
|
||||
|
||||
$PSVersionTable["PSEdition"] | Should Be $expected
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user