10000 Correcting regex in test · PowerShell/PowerShell@3f64b47 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f64b47

Browse files
author
Staffan Gustafsson
committed
Correcting regex in test
1 parent 8c02c06 commit 3f64b47

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ Describe "TabCompletion" -Tags CI {
9191
}
9292

9393
It 'Should complete "Get-Process -Id " with Id and name in tooltip' {
94+
Set-StrictMode -Version latest
9495
$cmd = 'Get-Process -Id '
95-
$res = TabExpansion2 -inputScript $cmd -cursorColumn $cmd.Length
96+
[System.Management.Automation.CommandCompletion]$res = TabExpansion2 -inputScript $cmd -cursorColumn $cmd.Length
9697
$res.CompletionMatches[0].CompletionText -match '^\d+$' | Should be true
97-
$res.CompletionMatches[0].ToolTip -match '^\w' | Should be true
98+
$res.CompletionMatches[0].ListItemText -match '^\d+ -' | Should be true
99+
$res.CompletionMatches[0].ToolTip -match '^\d+ -' | Should be true
98100
}
99101

100102
It 'Should complete keyword' -skip {

0 commit comments

Comments
 (0)
0