mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix binary operator tab completion (#2338)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user