Add property assignment completion for enums (#19178)

* Add property assignment completion for enums

* Move method
This commit is contained in:
MartinGC94
2023-02-23 13:42:57 -08:00
committed by GitHub
parent 6055a82f6b
commit 0a11f799dc
2 changed files with 29 additions and 0 deletions
@@ -378,6 +378,11 @@ using `
$res.CompletionMatches[0].CompletionText | Should -BeExactly '${PSVersionTable}'
}
It 'Should work for property assignment of enum type:' {
$res = TabExpansion2 -inputScript '$psstyle.Progress.View="Clas'
$res.CompletionMatches[0].CompletionText | Should -Be '"Classic"'
}
It 'Should work for variable assignment of enum type: <inputStr>' -TestCases @(
@{ inputStr = '$ErrorActionPreference = '; filter = ''; doubleQuotes = $false }
@{ inputStr = '$ErrorActionPreference='; filter = ''; doubleQuotes = $false }