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.

PR-URL: #11423
Ref: #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>
  • Loading branch information
aqrln authored and jasnell committed Apr 4, 2017
1 parent f62d9fc commit f4e8a6f
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 @@ -98,6 +98,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 f4e8a6f

Please sign in to comment.