Skip to content

Commit ee3165d

Browse files
hashseedaddaleax
authored andcommitted
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: #25866 Refs: #25851 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
1 parent 2e80b91 commit ee3165d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-icu-transcode.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ if (!common.hasIntl)
77

88
const buffer = require('buffer');
99
const assert = require('assert');
10-
const orig = Buffer.from('tést €', 'utf8');
10+
const orig = Buffer.from('těst ☕', 'utf8');
1111

1212
// Test Transcoding
1313
const tests = {
14-
'latin1': [0x74, 0xe9, 0x73, 0x74, 0x20, 0x3f],
14+
'latin1': [0x74, 0x3f, 0x73, 0x74, 0x20, 0x3f],
1515
'ascii': [0x74, 0x3f, 0x73, 0x74, 0x20, 0x3f],
16-
'ucs2': [0x74, 0x00, 0xe9, 0x00, 0x73,
16+
'ucs2': [0x74, 0x00, 0x1b, 0x01, 0x73,
1717
0x00, 0x74, 0x00, 0x20, 0x00,
18-
0xac, 0x20]
18+
0x15, 0x26]
1919
};
2020

2121
for (const test in tests) {

0 commit comments

Comments
 (0)