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
|
2011-07-13 05:13:59 -04:00
|
|
|
returns( Fog::AWS.escape( "'Stöp!' said Fred_-~." ) ) { "%27St%C3%B6p%21%27%20said%20Fred_-~." }
|
2013-09-02 08:12:46 -04:00
|
|
|
|
|
|
|
tests('Keys can contain a hierarchical prefix which should not be escaped') do
|
|
|
|
returns( Fog::AWS.escape( "key/with/prefix" ) ) { "key/with/prefix" }
|
|
|
|
end
|
2013-09-02 08:53:10 -04:00
|
|
|
|
|
|
|
tests('Keys should be canonicalised using Unicode NFC') do
|
2013-09-05 10:59:25 -04:00
|
|
|
returns( Fog::AWS.escape( ["C3A9".to_i(16)].pack("U*") ) ) { "%C3%A9" }
|
2013-09-02 08:53:10 -04:00
|
|
|
|
|
|
|
tests('Characters with combining mark should be combined and then escaped') do
|
2013-09-05 10:59:25 -04:00
|
|
|
returns( Fog::AWS.escape( ["0065".to_i(16), "CC81".to_i(16)].pack("U*") ) ) { "%C3%A9" }
|
2013-09-02 08:53:10 -04:00
|
|
|
end
|
|
|
|
end
|
2011-04-09 20:16:42 -04:00
|
|
|
end
|