Conversation
Turns out it's only spaces? git/git@f3fc4a1 |
I'm genuinely confused how this test ever passed. git/git@dbfdc62 is from 2010. 🤔 |
5f58c7d to
153fff5
Compare
| Context 'Removing the posh-git module' { | ||
| It 'Correctly reverts the Window Title back to original state' { | ||
| Set-Item function:\prompt -Value ([Runspace]::DefaultRunspace.InitialSessionState.Commands['prompt']).Definition | ||
| $originalTitle = & $module Get-Variable OriginalWindowTitle -ValueOnly |
There was a problem hiding this comment.
Why not?
$originalTitle = & $module { $OriginalWindowTitle }
There was a problem hiding this comment.
But do it after importing posh-git
There was a problem hiding this comment.
Ah, now I see you're capturing this variable in the test fixture before the test runs.
There was a problem hiding this comment.
Why not?
$originalTitle = & $module { $OriginalWindowTitle }
I don't use this syntax often, so I refer to
Line 7 in 5a87e8a
rkeithhill
left a comment
There was a problem hiding this comment.
Just a few suggestions otherwise LGTM
| Context 'Removing the posh-git module' { | ||
| It 'Correctly reverts the Window Title back to original state' { | ||
| Set-Item function:\prompt -Value ([Runspace]::DefaultRunspace.InitialSessionState.Commands['prompt']).Definition | ||
| $originalTitle = & $module Get-Variable OriginalWindowTitle -ValueOnly |
There was a problem hiding this comment.
But do it after importing posh-git
| } | ||
| It 'Tab completes add file in working dir with special char as quoted' { | ||
| $filename = 'foo{bar} (x86).txt'; | ||
| $filename = 'foo{bar} ��(x86).txt'; |
There was a problem hiding this comment.
What's with the unrecognized chars? Is that part of the "special char" test? Might be worth adding as another test for emoji/unprintable chars or whatever that is. IIRC this test was meant to check for tab completion with PowerShell and/or regex special chars/syntax e.g. {} and () in the completed text.
There was a problem hiding this comment.
Was just being lazy, but yeah the emoji is to ensure we're setting core.quotePath (and it's working as expected). Will break out as a separate test.
There was a problem hiding this comment.
What's with the unrecognized chars? Is that part of the "special char" test? Might be worth adding as another test for emoji/unprintable chars or whatever that is. IIRC this test was meant to check for tab completion with PowerShell and/or regex special chars/syntax e.g.
{}and()in the completed text.Was just being lazy, but yeah the emoji is to ensure we're setting
core.quotePath(and it's working as expected). Will break out as a separate test.
Turns out we already had a (better) test for this:
posh-git/test/TabExpansion.Tests.ps1
Lines 222 to 226 in a62f90c
Relocated into the appropriate Context.
dahlbyk
left a comment
There was a problem hiding this comment.
Thanks for the review, @rkeithhill
| Context 'Removing the posh-git module' { | ||
| It 'Correctly reverts the Window Title back to original state' { | ||
| Set-Item function:\prompt -Value ([Runspace]::DefaultRunspace.InitialSessionState.Commands['prompt']).Definition | ||
| $originalTitle = & $module Get-Variable OriginalWindowTitle -ValueOnly |
There was a problem hiding this comment.
Why not?
$originalTitle = & $module { $OriginalWindowTitle }
I don't use this syntax often, so I refer to
Line 7 in 5a87e8a
| } | ||
| It 'Tab completes add file in working dir with special char as quoted' { | ||
| $filename = 'foo{bar} (x86).txt'; | ||
| $filename = 'foo{bar} ��(x86).txt'; |
There was a problem hiding this comment.
What's with the unrecognized chars? Is that part of the "special char" test? Might be worth adding as another test for emoji/unprintable chars or whatever that is. IIRC this test was meant to check for tab completion with PowerShell and/or regex special chars/syntax e.g.
{}and()in the completed text.Was just being lazy, but yeah the emoji is to ensure we're setting
core.quotePath(and it's working as expected). Will break out as a separate test.
Turns out we already had a (better) test for this:
posh-git/test/TabExpansion.Tests.ps1
Lines 222 to 226 in a62f90c
Relocated into the appropriate Context.
Following on from #878, trying to get back to all green.
Expected: 'igf ' But was: 'git checkout 'seems to be a change in how either Pester or PowerShell handles-Scope Script; changing to-Scope Globalseems to fix. (@dscho you were close!)core.quotepath=false(from b689b5e in Fix tab expansion for non-ASCII file paths #403) no longer affectsgit status -sbas expected - a path with special characters is coming back in""regardless. This feels like a regression, but I haven't gone looking for release notes.