lib,test: remove lib/internal/test/unicode.js
Remove lib/internal/test/unicode.js and associated test. When we added the file and test, only comments in lib had non-ASCII characters. Now, lib/internal/cli_table.js has non-ASCII characters. Tests that exercise the `console.table()` therefore fulfill the need to test non-ASCII characters in built-in modules. PR-URL: https://github.com/nodejs/node/pull/25298 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
aea52299f7
commit
7e15f0490a
@ -4,6 +4,12 @@ const { Buffer } = require('buffer');
|
|||||||
const { removeColors } = require('internal/util');
|
const { removeColors } = require('internal/util');
|
||||||
const HasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
|
const HasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
|
||||||
|
|
||||||
|
// The use of Unicode characters below is the only non-comment use of non-ASCII
|
||||||
|
// Unicode characters in Node.js built-in modules. If they are ever removed or
|
||||||
|
// rewritten with \u escapes, then a test will need to be (re-)added to Node.js
|
||||||
|
// core to verify that Unicode characters work in built-ins. Otherwise,
|
||||||
|
// consumers using Unicode in _third_party_main.js will run into problems.
|
||||||
|
// Refs: https://github.com/nodejs/node/issues/10673
|
||||||
const tableChars = {
|
const tableChars = {
|
||||||
/* eslint-disable node-core/non-ascii-character */
|
/* eslint-disable node-core/non-ascii-character */
|
||||||
middleMiddle: '─',
|
middleMiddle: '─',
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This module exists entirely for regression testing purposes.
|
|
||||||
// See `test/parallel/test-internal-unicode.js`.
|
|
||||||
|
|
||||||
/* eslint-disable node-core/non-ascii-character */
|
|
||||||
module.exports = '✓';
|
|
||||||
/* eslint-enable node-core/non-ascii-character */
|
|
1
node.gyp
1
node.gyp
@ -161,7 +161,6 @@
|
|||||||
'lib/internal/socket_list.js',
|
'lib/internal/socket_list.js',
|
||||||
'lib/internal/test/binding.js',
|
'lib/internal/test/binding.js',
|
||||||
'lib/internal/test/heap.js',
|
'lib/internal/test/heap.js',
|
||||||
'lib/internal/test/unicode.js',
|
|
||||||
'lib/internal/timers.js',
|
'lib/internal/timers.js',
|
||||||
'lib/internal/tls.js',
|
'lib/internal/tls.js',
|
||||||
'lib/internal/trace_events_async_hooks.js',
|
'lib/internal/trace_events_async_hooks.js',
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
'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