From 72e760f201e40cc41b0bcd6f6613710f482029ff 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 --- 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 c2508898804a92..334fceadbe9983 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$/);