2011-07-12 09:59:51 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
2011-04-09 20:16:42 -04:00
|
|
|
Shindo.tests('AWS | signed_params', ['aws']) do
|
2013-10-16 09:23:02 -04:00
|
|
|
returns( Fog::AWS.escape( "'Stöp!' said Fred_-~./" ) ) { "%27St%C3%B6p%21%27%20said%20Fred_-~.%2F" }
|
2013-09-02 08:53:10 -04:00
|
|
|
|
2014-03-27 00:34:00 -04:00
|
|
|
tests('Unicode characters should be escaped') do
|
|
|
|
unicode = ["00E9".to_i(16)].pack("U*")
|
|
|
|
escaped = "%C3%A9"
|
|
|
|
returns( escaped ) { Fog::AWS.escape( unicode ) }
|
|
|
|
end
|
2013-09-02 08:53:10 -04:00
|
|
|
|
2014-03-27 00:34:00 -04:00
|
|
|
tests('Unicode characters with combining marks should be escaped') do
|
|
|
|
unicode = ["0065".to_i(16), "0301".to_i(16)].pack("U*")
|
|
|
|
escaped = "e%CC%81"
|
|
|
|
returns( escaped ) { Fog::AWS.escape( unicode ) }
|
2013-09-02 08:53:10 -04:00
|
|
|
end
|
2011-04-09 20:16:42 -04:00
|
|
|
end
|