Skip to content

Commit

Permalink
Updated ConvertTo-UnicodeEscape.tests.ps1 encoding to UTF-8 w/ BOM
Browse files Browse the repository at this point in the history
Hoping this will fix failing tests on Windows 2016 / PS 5.1
  • Loading branch information
RobFaie committed Mar 29, 2020
1 parent 4d727c3 commit fd99c84
Showing 1 changed file with 98 additions and 2 deletions.
100 changes: 98 additions & 2 deletions tests/ConvertTo-UnicodeEscape.tests.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,107 @@
Import-Module "$PSScriptRoot/../PwshZendesk.psm1" -Force
Import-Module "$PSScriptRoot/../PwshZendesk.psm1" -Force

Describe 'ConvertTo-UnicodeEscape' {

InModuleScope PwshZendesk {

# Space to tilde includes most of ascii
$cases = ' '..'~' | ForEach-Object { @{ Char = $_ } }
$cases = @(
@{ Char = ' ' }
@{ Char = '!' }
@{ Char = '"' }
@{ Char = '#' }
@{ Char = '$' }
@{ Char = '%' }
@{ Char = '&' }
@{ Char = "'" }
@{ Char = '(' }
@{ Char = ')' }
@{ Char = '*' }
@{ Char = '+' }
@{ Char = ',' }
@{ Char = '-' }
@{ Char = '.' }
@{ Char = '/' }
@{ Char = '0' }
@{ Char = '1' }
@{ Char = '2' }
@{ Char = '3' }
@{ Char = '4' }
@{ Char = '5' }
@{ Char = '6' }
@{ Char = '7' }
@{ Char = '8' }
@{ Char = '9' }
@{ Char = ':' }
@{ Char = ';' }
@{ Char = '<' }
@{ Char = '=' }
@{ Char = '>' }
@{ Char = '?' }
@{ Char = '@' }
@{ Char = 'A' }
@{ Char = 'B' }
@{ Char = 'C' }
@{ Char = 'D' }
@{ Char = 'E' }
@{ Char = 'F' }
@{ Char = 'G' }
@{ Char = 'H' }
@{ Char = 'I' }
@{ Char = 'J' }
@{ Char = 'K' }
@{ Char = 'L' }
@{ Char = 'M' }
@{ Char = 'N' }
@{ Char = 'O' }
@{ Char = 'P' }
@{ Char = 'Q' }
@{ Char = 'R' }
@{ Char = 'S' }
@{ Char = 'T' }
@{ Char = 'U' }
@{ Char = 'V' }
@{ Char = 'W' }
@{ Char = 'X' }
@{ Char = 'Y' }
@{ Char = 'Z' }
@{ Char = '[' }
@{ Char = '\' }
@{ Char = ']' }
@{ Char = '^' }
@{ Char = '_' }
@{ Char = '`' }
@{ Char = 'a' }
@{ Char = 'b' }
@{ Char = 'c' }
@{ Char = 'd' }
@{ Char = 'e' }
@{ Char = 'f' }
@{ Char = 'g' }
@{ Char = 'h' }
@{ Char = 'i' }
@{ Char = 'j' }
@{ Char = 'k' }
@{ Char = 'l' }
@{ Char = 'm' }
@{ Char = 'n' }
@{ Char = 'o' }
@{ Char = 'p' }
@{ Char = 'q' }
@{ Char = 'r' }
@{ Char = 's' }
@{ Char = 't' }
@{ Char = 'u' }
@{ Char = 'v' }
@{ Char = 'w' }
@{ Char = 'x' }
@{ Char = 'y' }
@{ Char = 'z' }
@{ Char = '{' }
@{ Char = '|' }
@{ Char = '}' }
@{ Char = '~' }
)

It 'Does not escape: <Char>' -TestCases $cases {
Param ($Char)
Expand Down

0 comments on commit fd99c84

Please sign in to comment.