From ee3165d6e7bae1a20973928d0b004c6ba60115ec Mon Sep 17 00:00:00 2001 From: Yang Guo Date: Fri, 1 Feb 2019 08:49:28 +0100 Subject: [PATCH] test: relax expectations in test-icu-transcode Chromium's ICU considers "latin1" and "ascii" to mean Windows-1252, which is consistent with [WHATWG spec](https://encoding.spec.whatwg.org/#names-and-labels). If linked against Chromium's ICU, Node.js therefore fails `test/parallel/test-icu-transcode`. PR-URL: https://github.com/nodejs/node/pull/25866 Refs: https://github.com/nodejs/node/issues/25851 Reviewed-By: Anna Henningsen Reviewed-By: Tiancheng "Timothy" Gu --- test/parallel/test-icu-transcode.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-icu-transcode.js b/test/parallel/test-icu-transcode.js index 07a7f07324ba5c..0b44c7795e5b15 100644 --- a/test/parallel/test-icu-transcode.js +++ b/test/parallel/test-icu-transcode.js @@ -7,15 +7,15 @@ if (!common.hasIntl) const buffer = require('buffer'); const assert = require('assert'); -const orig = Buffer.from('tést €', 'utf8'); +const orig = Buffer.from('těst ☕', 'utf8'); // Test Transcoding const tests = { - 'latin1': [0x74, 0xe9, 0x73, 0x74, 0x20, 0x3f], + 'latin1': [0x74, 0x3f, 0x73, 0x74, 0x20, 0x3f], 'ascii': [0x74, 0x3f, 0x73, 0x74, 0x20, 0x3f], - 'ucs2': [0x74, 0x00, 0xe9, 0x00, 0x73, + 'ucs2': [0x74, 0x00, 0x1b, 0x01, 0x73, 0x00, 0x74, 0x00, 0x20, 0x00, - 0xac, 0x20] + 0x15, 0x26] }; for (const test in tests) {