1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Fix the Unicode strings for Ruby 1.8.7

Can’t use \u{xxxx} :(
This commit is contained in:
Keith Duncan 2013-09-05 15:59:25 +01:00
parent 20a0f7dd3e
commit cb697458c6

View file

@ -8,10 +8,10 @@ Shindo.tests('AWS | signed_params', ['aws']) do
end
tests('Keys should be canonicalised using Unicode NFC') do
returns( Fog::AWS.escape( "\u{00e9}" ) ) { "%C3%A9" }
returns( Fog::AWS.escape( ["C3A9".to_i(16)].pack("U*") ) ) { "%C3%A9" }
tests('Characters with combining mark should be combined and then escaped') do
returns( Fog::AWS.escape( "\u{0065}\u{0301}" ) ) { "%C3%A9" }
returns( Fog::AWS.escape( ["0065".to_i(16), "CC81".to_i(16)].pack("U*") ) ) { "%C3%A9" }
end
end
end