mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-10-08 06:26:45 +00:00
Add localization framework for the GUI (en-US baseline) (#764)
Credit to @jmolinap2 for their work in #643, which was used as inspiration.
This commit is contained in:
@@ -42,4 +42,17 @@ Describe 'Import-JsonFile' {
|
||||
$result | Should -BeNullOrEmpty
|
||||
Should -Invoke Write-Error -Times 0 -Exactly
|
||||
}
|
||||
|
||||
It 'reads non-ASCII characters correctly from a UTF-8 file with no BOM, regardless of the system default encoding' {
|
||||
# Unicode escapes here, not literal accented characters: this test file has no BOM, so
|
||||
# PowerShell 5.1 would decode literal non-ASCII source characters using the system default
|
||||
# codepage too, defeating the point of the assertion on a non-UTF-8-default machine.
|
||||
$expectedName = "Espa$([char]0x00F1)ol"
|
||||
$expectedNote = "caf$([char]0x00E9), na$([char]0x00EF)ve, $([char]0x00FC)ber"
|
||||
|
||||
$result = Import-JsonFile -filePath (Join-Path $script:FixturePath 'Config.Utf8NoBom.json')
|
||||
|
||||
$result.Name | Should -Be $expectedName
|
||||
$result.Note | Should -Be $expectedNote
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user