mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add completion for variables assigned by the Data statement (#19831)
This commit is contained in:
@@ -657,6 +657,12 @@ ConstructorTestClass(int i, bool b)
|
||||
$res.CompletionMatches[0].CompletionText | Should -BeExactly Cat
|
||||
}
|
||||
|
||||
It 'Should complete variable assigned with Data statement' {
|
||||
$TestString = 'data MyDataVar {"Hello"};$MyDatav'
|
||||
$res = TabExpansion2 -inputScript $TestString
|
||||
$res.CompletionMatches[0].CompletionText | Should -BeExactly '$MyDataVar'
|
||||
}
|
||||
|
||||
it 'Should complete "Value" parameter value in "Where-Object" for Enum property with no input' {
|
||||
$res = TabExpansion2 -inputScript 'Get-Command | where-Object CommandType -eq '
|
||||
$res.CompletionMatches[0].CompletionText | Should -BeExactly Alias
|
||||
|
||||
Reference in New Issue
Block a user