mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Ensure HelpInfo.Category is consistently a string (#18254)
This commit is contained in:
1 parent
65b353d9cf
commit
4f19c05547
3 files changed
+12
-2
No files matched your search
@@ -45,6 +45,16 @@ function GetCurrentUserHelpRoot {
|
||||
return $userHelpRoot
|
||||
}
|
||||
|
||||
Describe 'Validate HelpInfo type' -Tags @('CI') {
|
||||
|
||||
It 'Category should be a string' {
|
||||
$help = Get-Help *
|
||||
$category = $help | ForEach-Object { $_.Category.GetType().FullName } | Select-Object -Unique
|
||||
$category.Count | Should -Be 1 -Because 'All help categories should be strings, >1 indicates a type mismatch'
|
||||
$category | Should -BeExactly 'System.String'
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Validate that <pshome>/<culture>/default.help.txt is present" -Tags @('CI') {
|
||||
|
||||
It "Get-Help returns information about the help system" {
|
||||
|
||||
Reference in new issue
Block a user