diff options
author | w0rp <devw0rp@gmail.com> | 2020-08-10 02:03:41 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-08-10 02:03:41 +0100 |
commit | 05210846e41ea1e3cfc1c8e91834951f642348f7 (patch) | |
tree | 78909caa7ecd99e78528acdc43fb4ad64d579288 /test/test_path_uri.vader | |
parent | bf3c3e943880876e2a8f3bf04c26f365c63fd0ad (diff) | |
download | ale-05210846e41ea1e3cfc1c8e91834951f642348f7.zip |
Fix #3278 - Handle UTF-8 in URI encoding/decoding
Diffstat (limited to 'test/test_path_uri.vader')
-rw-r--r-- | test/test_path_uri.vader | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_path_uri.vader b/test/test_path_uri.vader index cc2287cb..0f2cba7e 100644 --- a/test/test_path_uri.vader +++ b/test/test_path_uri.vader @@ -1,3 +1,6 @@ +Before: + scriptencoding utf-8 + Execute(ale#path#ToURI should work for Windows paths): AssertEqual 'file:///C:/foo/bar/baz.tst', ale#path#ToURI('C:\foo\bar\baz.tst') AssertEqual 'foo/bar/baz.tst', ale#path#ToURI('foo\bar\baz.tst') @@ -62,3 +65,9 @@ Execute(ale#path#ToURI should percent encode unsafe characters): Execute(ale#path#FromURI should decode percent encodings): AssertEqual ' +:?&=', ale#path#FromURI('%20%2b%3a%3f%26%3d') + +Execute(ale#path#ToURI should handle UTF-8): + AssertEqual 'file:///T%c3%a9l%c3%a9chargement', ale#path#ToURI('/Téléchargement') + +Execute(ale#path#FromURI should handle UTF-8): + AssertEqual '/Téléchargement', ale#path#FromURI('file:///T%C3%A9l%C3%A9chargement') |