diff options
author | Péter Dimitrov <[email protected]> | 2017-10-16 16:12:18 +0200 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2017-10-23 15:53:29 +0200 |
commit | fd276f4a2a109d19d25cffee54a2c21ee4568085 (patch) | |
tree | 6db71222615fcfaa8319396530fe59953be98a99 /lib/stdlib/test/uri_string_SUITE.erl | |
parent | 57f8021105f1c213be674681f48d0c8e92935ff6 (diff) | |
download | otp-fd276f4a2a109d19d25cffee54a2c21ee4568085.tar.gz otp-fd276f4a2a109d19d25cffee54a2c21ee4568085.tar.bz2 otp-fd276f4a2a109d19d25cffee54a2c21ee4568085.zip |
stdlib: Improve support of mixed lists (transcode)
- transcode/2 flattens input lists in order to be able to handle
lists with percent-encoded parts that are split into muliple
list and binary segments.
- Add additional tests for transcoding mixed lists.
Diffstat (limited to 'lib/stdlib/test/uri_string_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/uri_string_SUITE.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/stdlib/test/uri_string_SUITE.erl b/lib/stdlib/test/uri_string_SUITE.erl index 8a10948f32..901d38a4da 100644 --- a/lib/stdlib/test/uri_string_SUITE.erl +++ b/lib/stdlib/test/uri_string_SUITE.erl @@ -794,7 +794,11 @@ transcode_options(_Config) -> transcode_mixed(_Config) -> "foo%00%00%00%F6bar" = - uri_string:transcode(["foo",<<"%C3%B6"/utf8>>,<<"ba"/utf8>>,"r"], [{out_encoding, utf32}]). + uri_string:transcode(["foo",<<"%C3%B6"/utf8>>,<<"ba"/utf8>>,"r"], [{out_encoding, utf32}]), + "foo%00%00%00%F6bar" = + uri_string:transcode(["foo",<<"%C3%"/utf8>>,<<"B6ba"/utf8>>,"r"], [{out_encoding, utf32}]), + "foo%C3%B6bar" = + uri_string:transcode(["foo%00", <<"%00%0"/utf32>>,<<"0%F"/utf32>>,"6bar"], [{in_encoding, utf32},{out_encoding, utf8}]). transcode_negative(_Config) -> {invalid_input,"foo","BX"} = |