File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Tests/Engine/SettingsTest/Issue1095 Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -395,7 +395,7 @@ private void parseSettingsHashtable(Hashtable settingsHashtable)
395395 var settings = GetDictionaryFromHashtable ( settingsHashtable ) ;
396396 foreach ( var settingKey in settings . Keys )
397397 {
398- var key = settingKey . ToLower ( ) ;
398+ var key = settingKey . ToLowerInvariant ( ) ;
399399 object val = settings [ key ] ;
400400 switch ( key )
401401 {
Original file line number Diff line number Diff line change 1+ Describe " Issue 1095: An exception is thrown when CurrentCulture is Turkish (tr-TR)" {
2+ It " Should not throw an exception when CurrentCulture is tr-TR" {
3+ # https://github.com/PowerShell/PSScriptAnalyzer/issues/1095
4+
5+
6+ {
7+ $trTRculture = [System.Globalization.CultureInfo ]::GetCultureInfo(' tr-TR' )
8+ [System.Threading.Thread ]::CurrentThread.CurrentUICulture = $trTRculture
9+ [System.Threading.Thread ]::CurrentThread.CurrentCulture = $trTRculture
10+ Invoke-Formatter " `$ test" - ErrorAction Stop
11+
12+ } | Should - Throw -Not
13+
14+ BeforeEach {
15+ $initialCulture = Get-Culture
16+ $initialUICulture = Get-UICulture
17+ }
18+
19+ AfterEach {
20+ [System.Threading.Thread ]::CurrentThread.CurrentCulture = $initialCulture
21+ [System.Threading.Thread ]::CurrentThread.CurrentUICulture = $initialUICulture
22+ }
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments