diff options
author | Timothy Gu <timothygu99@gmail.com> | 2017-02-03 22:06:04 -0800 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2017-02-14 12:13:11 -0800 |
commit | c6b12d0984cc2891433b57cf344b433059681667 (patch) | |
tree | 676f8de002d49b555ca931c05410e7e227da7cd2 /test/parallel/test-url-format.js | |
parent | b738cbcdd381a3bcef0111d75d5081bec70d8ce4 (diff) | |
download | android-node-v8-c6b12d0984cc2891433b57cf344b433059681667.tar.gz android-node-v8-c6b12d0984cc2891433b57cf344b433059681667.tar.bz2 android-node-v8-c6b12d0984cc2891433b57cf344b433059681667.zip |
url: fix surrogate handling in encodeAuth()
Also factor out common parts in querystring and url.
PR-URL: https://github.com/nodejs/node/pull/11161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'test/parallel/test-url-format.js')
-rw-r--r-- | test/parallel/test-url-format.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/parallel/test-url-format.js b/test/parallel/test-url-format.js index fa4805bc8a..ba427628c2 100644 --- a/test/parallel/test-url-format.js +++ b/test/parallel/test-url-format.js @@ -235,6 +235,15 @@ const formatTests = { protocol: 'file', pathname: '/home/user', path: '/home/user' + }, + + // surrogate in auth + 'http://%F0%9F%98%80@www.example.com/': { + href: 'http://%F0%9F%98%80@www.example.com/', + protocol: 'http:', + auth: '\uD83D\uDE00', + hostname: 'www.example.com', + pathname: '/' } }; for (const u in formatTests) { |