File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
test/powershell/engine/Help Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -272,5 +272,29 @@ Describe "Get-Help should find pattern help files" -Tags "CI" {
272
272
)
273
273
$command.Invoke () | Should Be $result
274
274
}
275
+ }
276
+
277
+ Describe " Get-Help should find pattern alias" - Tags " CI" {
278
+ # Remove test alias
279
+ AfterAll {
280
+ Remove-Item alias:\testAlias1
281
+ }
282
+
283
+ It " Get-Help should find alias as command" {
284
+ (Get-Help where ).Name | Should BeExactly " Where-Object"
285
+ }
286
+
287
+ It " Get-Help should find alias with ? pattern" {
288
+ $help = Get-Help wher?
289
+ $help.Category | Should BeExactly " Alias"
290
+ $help.Synopsis | Should BeExactly " Where-Object"
291
+ }
292
+
293
+ It " Get-Help should find alias with * pattern" {
294
+ Set-Alias - Name testAlias1 - Value Where-Object
295
+ $help = Get-Help testAlias1*
296
+ $help.Category | Should BeExactly " Alias"
297
+ $help.Synopsis | Should BeExactly " Where-Object"
298
+ }
275
299
276
300
}
You can’t perform that action at this time.
0 commit comments