Fix binary operator tab completion (#2338)

This commit is contained in:
Dongbo Wang
2016-09-22 11:56:38 -07:00
committed by Jason Shirk
parent 309bf603f9
commit bf59194c6e
2 changed files with 20 additions and 3 deletions
@@ -1,9 +1,24 @@
Describe "Issue#682 - [system.manage<tab>] should work" -Tags "CI" {
Describe "Tab completion bug fix" -Tags "CI" {
It "[system.manage<tab>" {
It "Issue#682 - '[system.manage<tab>' should work" {
$result = TabExpansion2 -inputScript "[system.manage" -cursorColumn "[system.manage".Length
$result | Should Not BeNullOrEmpty
$result.CompletionMatches.Count | Should Be 1
$result.CompletionMatches[0].CompletionText | Should Be "System.Management"
}
It "Issue#1350 - '1 -sp<tab>' should work" {
$result = TabExpansion2 -inputScript "1 -sp" -cursorColumn "1 -sp".Length
$result | Should Not BeNullOrEmpty
$result.CompletionMatches.Count | Should Be 1
$result.CompletionMatches[0].CompletionText | Should Be "-split"
}
It "Issue#1350 - '1 -a<tab>' should work" {
$result = TabExpansion2 -inputScript "1 -a" -cursorColumn "1 -a".Length
$result | Should Not BeNullOrEmpty
$result.CompletionMatches.Count | Should Be 2
$result.CompletionMatches[0].CompletionText | Should Be "-and"
$result.CompletionMatches[1].CompletionText | Should Be "-as"
}
}