Add wildcard back to end of tab completion command lookup (#9383)

Re-add wildcard when searching AST + Missed test case.

## PR Context

In #8109, we removed the line that added a wildcard to the end of the command that was used to match commands in the script AST. This readds that line closer to where it is used.
This commit is contained in:
Tyler James Leonhardt
2019-04-18 11:42:49 -07:00
committed by Travis Plunk
parent e9ffbe5cf2
commit 9140e421ec
2 changed files with 4 additions and 0 deletions
@@ -485,6 +485,7 @@ Describe "TabCompletion" -Tags CI {
@{ inputStr = '$A=[datetime]::now;$A.'; expected = 'Date'; setup = $null }
@{ inputStr = 'try { 1/0 } catch {};$error[0].'; expected = 'CategoryInfo'; setup = $null }
@{ inputStr = '$x= gps pwsh;$x.*pm'; expected = 'NPM'; setup = $null }
@{ inputStr = 'function Get-ScrumData {}; Get-Scrum'; expected = 'Get-ScrumData'; setup = $null }
@{ inputStr = 'function write-output {param($abcd) $abcd};Write-Output -a'; expected = '-abcd'; setup = $null }
@{ inputStr = 'function write-output {param($abcd) $abcd};Microsoft.PowerShell.Utility\Write-Output -'; expected = '-InputObject'; setup = $null }
@{ inputStr = '[math]::Co'; expected = 'Cos('; setup = $null }