Skip to content

Commit

Permalink
test: add Unicode characters regression test
Browse files Browse the repository at this point in the history
This test ensures that UTF-8 characters can be used in core JavaScript
modules built into Node's binary.

Refs: nodejs#11129
  • Loading branch information
aqrln committed Feb 16, 2017
1 parent 00c86cc commit 6fb4942
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/internal/test/unicode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';

// This module exists entirely for regression testing purposes.
// See `test/parallel/test-internal-unicode.js`.

module.exports = '✓';
1 change: 1 addition & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
'lib/internal/readline.js',
'lib/internal/repl.js',
'lib/internal/socket_list.js',
'lib/internal/test/unicode.js',
'lib/internal/url.js',
'lib/internal/util.js',
'lib/internal/v8_prof_polyfill.js',
Expand Down
12 changes: 12 additions & 0 deletions test/parallel/test-internal-unicode.js
Original file line number Diff line number Diff line change
@@ -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, '✓');

0 comments on commit 6fb4942

Please sign in to comment.