From 9baaff7ae7c4c8af81662528ba70e3e3eb60843e Mon Sep 17 00:00:00 2001 From: Nao YONASHIRO Date: Wed, 12 Apr 2017 15:51:05 +0900 Subject: [PATCH] test: improve punycode coverage to check surrogate pair PR-URL: https://github.com/nodejs/node/pull/12354 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- test/parallel/test-punycode.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel/test-punycode.js b/test/parallel/test-punycode.js index 5a41d5433dd443..1d81fe339f808c 100644 --- a/test/parallel/test-punycode.js +++ b/test/parallel/test-punycode.js @@ -13,6 +13,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'); @@ -24,6 +25,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$/);