Fix Get-Help not properly displaying if parameter supports wildcards (#13353)

This commit is contained in:
Thomas Nieto
2020-08-11 10:20:45 -07:00
committed by GitHub
parent d8f8f0a8bc
commit 46efd38ef5
3 changed files with 56 additions and 0 deletions
@@ -614,6 +614,33 @@ Describe 'get-help other tests' -Tags "CI" {
It '$x.Parameters.parameter[2].defaultValue' { $x.Parameters.parameter[2].defaultValue | Should -BeExactly 'parameter is mandatory' }
}
Context 'get-help helpFunc14' {
function helpFunc14
{
param(
[SupportsWildcards()]
$p1
)
}
$x = Get-Help helpFunc14
It '$x.Parameters.parameter[0].globbing' { $x.Parameters.parameter[0].globbing | Should -BeExactly 'true' }
}
Context 'get-help helpFunc15' {
function helpFunc15
{
param(
$p1
)
}
$x = Get-Help helpFunc15
It '$x.Parameters.parameter[0].globbing' { $x.Parameters.parameter[0].globbing | Should -BeExactly 'false' }
}
Context 'get-help -Examples prompt string should have trailing space' {
function foo {
<#