mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Improve type inference and completions (#16963)
This commit is contained in:
1 parent
e1521117db
commit
4f6e574820
6 files changed
+188
-60
No files matched your search
+4
-6
@@ -554,22 +554,20 @@ try
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Tab expansion in constrained language mode" -Tags 'Feature','RequireAdminOnWindows' {
|
||||
Describe "Conversion in constrained language mode" -Tags 'Feature','RequireAdminOnWindows' {
|
||||
|
||||
It "Verifies that tab expansion cannot convert disallowed IntPtr type" {
|
||||
It "Verifies that PowerShell cannot convert disallowed IntPtr type" {
|
||||
|
||||
try
|
||||
{
|
||||
$ExecutionContext.SessionState.LanguageMode = "ConstrainedLanguage"
|
||||
|
||||
$result = @(TabExpansion2 '(1234 -as [IntPtr]).' 20 | ForEach-Object CompletionMatches | Where-Object CompletionText -Match Pointer)
|
||||
$result = 1234 -as [IntPtr]
|
||||
$null -eq $result | Should -BeTrue
|
||||
}
|
||||
finally
|
||||
{
|
||||
Invoke-LanguageModeTestingSupportCmdlet -EnableFullLanguageMode
|
||||
}
|
||||
|
||||
$result.Count | Should -Be 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user