test: add Unicode characters regression test
This test ensures that UTF-8 characters can be used in core JavaScript modules built into Node's binary. PR-URL: https://github.com/nodejs/node/pull/11423 Ref: https://github.com/nodejs/node/pull/11129 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
f62d9fc89f
commit
f4e8a6f1f0
6
lib/internal/test/unicode.js
Normal file
6
lib/internal/test/unicode.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
// This module exists entirely for regression testing purposes.
|
||||||
|
// See `test/parallel/test-internal-unicode.js`.
|
||||||
|
|
||||||
|
module.exports = '✓';
|
1
node.gyp
1
node.gyp
@ -98,6 +98,7 @@
|
|||||||
'lib/internal/readline.js',
|
'lib/internal/readline.js',
|
||||||
'lib/internal/repl.js',
|
'lib/internal/repl.js',
|
||||||
'lib/internal/socket_list.js',
|
'lib/internal/socket_list.js',
|
||||||
|
'lib/internal/test/unicode.js',
|
||||||
'lib/internal/url.js',
|
'lib/internal/url.js',
|
||||||
'lib/internal/util.js',
|
'lib/internal/util.js',
|
||||||
'lib/internal/v8_prof_polyfill.js',
|
'lib/internal/v8_prof_polyfill.js',
|
||||||
|
12
test/parallel/test-internal-unicode.js
Normal file
12
test/parallel/test-internal-unicode.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
'use strict';
|
||||||
|
require('../common');
|
||||||
|
|
||||||
|
// Flags: --expose-internals
|
||||||
|
//
|
||||||
|
// This test ensures that UTF-8 characters can be used in core JavaScript
|
||||||
|
// libraries built into Node's binary.
|
||||||
|
|
||||||
|
const assert = require('assert');
|
||||||
|
const character = require('internal/test/unicode');
|
||||||
|
|
||||||
|
assert.strictEqual(character, '✓');
|
Loading…
x
Reference in New Issue
Block a user