diff options
author | Nao YONASHIRO <owan.orisano@gmail.com> | 2017-04-12 15:51:05 +0900 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-04-13 15:05:47 -0700 |
commit | 05a00a0c433a285bbae8c9954ec08fc99c42e4f1 (patch) | |
tree | 65d5ddcbb0382be689c96bd2326328fe2c1ff538 /test/parallel/test-punycode.js | |
parent | a4125a3c49f4557173189c68f772b869829cd79e (diff) | |
download | android-node-v8-05a00a0c433a285bbae8c9954ec08fc99c42e4f1.tar.gz android-node-v8-05a00a0c433a285bbae8c9954ec08fc99c42e4f1.tar.bz2 android-node-v8-05a00a0c433a285bbae8c9954ec08fc99c42e4f1.zip |
test: improve punycode coverage to check surrogate pair
PR-URL: https://github.com/nodejs/node/pull/12354
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/parallel/test-punycode.js')
-rw-r--r-- | test/parallel/test-punycode.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js index c250889880..334fceadbe 100644 --- a/test/parallel/test-punycode.js +++ b/test/parallel/test-punycode.js @@ -34,6 +34,7 @@ assert.strictEqual( 'Willst du die Blthe des frhen, die Frchte des spteren Jahres-x9e96lkal' ); assert.strictEqual(punycode.encode('日本語'), 'wgv71a119e'); +assert.strictEqual(punycode.encode('𩸽'), 'x73l'); assert.strictEqual(punycode.decode('tda'), 'ü'); assert.strictEqual(punycode.decode('Goethe-'), 'Goethe'); @@ -45,6 +46,7 @@ assert.strictEqual( 'Willst du die Blüthe des frühen, die Früchte des späteren Jahres' ); assert.strictEqual(punycode.decode('wgv71a119e'), '日本語'); +assert.strictEqual(punycode.decode('x73l'), '𩸽'); assert.throws(() => { punycode.decode(' '); }, /^RangeError: Invalid input$/); |