Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
eb15c8d
test: fix pummel test failures
Trott Apr 2, 2016
f6d16c1
src: add missing 'inline' keywords
bnoordhuis Apr 5, 2016
fd8e7de
doc: note about Android support
Trott Apr 4, 2016
8ab2d73
test: enforce strict mode for test-domain-crypto
Trott Apr 4, 2016
8952330
build: remove -f{data,function}-sections flags
bnoordhuis Apr 6, 2016
ab80b23
doc: simple doc typo fix
BrendonPierson Apr 4, 2016
9104902
doc: update openssl LICENSE using license-builder.sh
srl295 Apr 5, 2016
838efb4
deps: backport 125ac66 from v8 upstream
Apr 6, 2016
d7b63d0
test: refactor test-file-write-stream3
Trott Apr 5, 2016
ce6c5ac
doc: add example using algorithms not directly exposed
hillbrad Apr 7, 2016
e1ce18a
buffer: standardize array index check
trevnorris Apr 6, 2016
8f5a271
doc: add topic - event loop, timers, `nextTick()`
techjeffharris Apr 8, 2016
820dd58
repl: refactor repl.js
Trott Apr 6, 2016
b9ac6b0
path: fixing a test that breaks on some machines.
Apr 5, 2016
251fc03
test: fix flaky test-http-client-abort
Trott Apr 8, 2016
c3fecfd
doc: fix scrolling on iOS devices
lpinca Mar 23, 2016
a6cf6aa
tools,doc: fix incomplete json produced by doctool
firedfox Mar 31, 2016
052c919
tools,doc: fix json for grouped optional params
firedfox Mar 31, 2016
ff61555
doc: describe child.kill() pitfalls on linux
eljefedelrodeodeljefe Apr 5, 2016
79d612f
doc: clarification for maxBuffer and Unicode output
jasnell Apr 9, 2016
625951d
doc: add copy about how to curl SHA256.txt
Apr 8, 2016
11d617c
stream: Fix readableState.awaitDrain mechanism
addaleax Apr 2, 2016
e6df83d
tools: remove simplejson dependency
thefourtheye Apr 7, 2016
1b8dad2
test: fix flaky test-child-process-fork-net
Trott Apr 9, 2016
fa4956d
deps: cherry-pick 1383d00 from v8 upstream
indutny Apr 13, 2016
0c6bc2c
streams: support unlimited synchronous cork/uncork cycles
mcollina Apr 12, 2016
6021b82
repl: don’t complete non-simple expressions
addaleax Apr 14, 2016
2a0e70e
doc: fix incorrect references in buffer docs
Amery2010 Apr 14, 2016
6729ffc
deps: upgrade npm to 3.8.6
zkat Apr 11, 2016
ac3f0c5
deps: floating fix for npm's test-node script
zkat Apr 11, 2016
39f887e
benchmark: add module loader benchmark parameter
mscdex Feb 10, 2016
93ff5de
doc: add addaleax to collaborators
addaleax Apr 15, 2016
2bb5f95
doc: add santigimeno to collaborators
santigimeno Apr 15, 2016
5252f7a
doc: add iWuzHere to collaborators
imran-iq Apr 15, 2016
bc29c43
doc: add stefanmb to collaborators
stefanmb Apr 15, 2016
b88e3a4
doc: add domain postmortem
trevnorris Apr 11, 2016
c1c3585
test,vm: enable strict mode for vm tests
Trott Apr 15, 2016
39fb5f7
doc: clarify fs.watch() and inodes on linux, os x
jorangreef Apr 7, 2016
2567f2d
tools,doc: parse types in braces everywhere
estliberitas Feb 20, 2016
a31610e
process: fix incorrect usage of assert.fail()
Trott Apr 15, 2016
b22ab38
doc: native module reloading is not supported
bengl Apr 12, 2016
763a867
test,repl: use deepStrictEqual for false-y values
Fishrock123 Apr 14, 2016
46f774f
doc: explain differences in console.assert between node and browsers
jasnell Apr 12, 2016
dae99cb
gitignore: ignore VS 2015 *.VC.opendb files
Apr 5, 2016
1dc77e8
gitignore: adding .vs/ directory to .gitignore
Apr 13, 2016
b0457d9
tools: fix license-builder.sh again for ICU
srl295 Apr 5, 2016
8760dc6
doc: document intention and dangers of fs module Buffer API
seishun Apr 2, 2016
7066394
doc: fix http response event, Agent#getName
mdouglass Apr 1, 2016
41123d0
doc: DCO anchor that doesn't change
williamkapke Apr 18, 2016
599219d
doc: replace functions with arrow functions
Apr 14, 2016
690192c
assert: respect assert.doesNotThrow message.
Aug 17, 2015
744fe56
test: fix test-net-settimeout flakiness
santigimeno Apr 12, 2016
4be2e15
test: fix flaky test-http-set-timeout-server
santigimeno Apr 15, 2016
ea3c09f
tools: update ESLint to 2.7.0
silverwind Apr 9, 2016
196cc0c
test: fix issues for ESLint 2.7.0
silverwind Apr 9, 2016
799f414
lib,test,tools: alignment on variable assignments
Trott Apr 16, 2016
6f01ff2
tools: lint for alignment of variable assignments
Trott Apr 16, 2016
b3e62f5
tools: improve js linter
mscdex Mar 10, 2016
5d5b9e1
build: allow test-ci to run tests in parallel
jbergstroem Apr 15, 2016
3bb38b6
test: move the debugger tests back to parallel
santigimeno Apr 15, 2016
089b855
test: move some test from sequential to parallel
santigimeno Apr 5, 2016
6319f1f
doc: path.format provide more examples
eversojk Mar 22, 2016
6606905
tools: move message listener to worker objects
mscdex Apr 15, 2016
0c96eb4
doc: fix broken references
gromnitsky Apr 13, 2016
ec11dfb
test: move debugger tests to sequential
Trott Apr 14, 2016
31e6b5f
2016-04-20, Version 5.10.2 (Stable) Release
Apr 20, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lib,test,tools: alignment on variable assignments
Correct alignment on variable assignments that span multiple lines in
preparation for lint rule to enforce such alignment.

PR-URL: #6242
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and Myles Borins committed Apr 20, 2016
commit 799f41410a3575109796957b0b1c1f088487bc3a
7 changes: 4 additions & 3 deletions lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,10 @@ function checkExecSyncError(ret) {
ret.error = null;

if (!err) {
var msg = 'Command failed: ' +
(ret.cmd ? ret.cmd : ret.args.join(' ')) +
(ret.stderr ? '\n' + ret.stderr.toString() : '');
var msg = 'Command failed: ';
msg += ret.cmd || ret.args.join(' ');
if (ret.stderr)
msg += '\n' + ret.stderr.toString();
err = new Error(msg);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ exports._builtinLibs = ['assert', 'buffer', 'child_process', 'cluster',
'string_decoder', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib'];


const BLOCK_SCOPED_ERROR = 'Block-scoped declarations (let, ' +
'const, function, class) not yet supported outside strict mode';
const BLOCK_SCOPED_ERROR = 'Block-scoped declarations (let, const, function, ' +
'class) not yet supported outside strict mode';


class LineParser {
Expand Down
9 changes: 6 additions & 3 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,12 @@ function formatPrimitive(ctx, value) {
var type = typeof value;

if (type === 'string') {
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
.replace(/'/g, "\\'")
.replace(/\\"/g, '"') + '\'';
var simple = '\'' +
JSON.stringify(value)
.replace(/^"|"$/g, '')
.replace(/'/g, "\\'")
.replace(/\\"/g, '"') +
'\'';
return ctx.stylize(simple, 'string');
}
if (type === 'number') {
Expand Down
4 changes: 2 additions & 2 deletions lib/zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const binding = process.binding('zlib');
const util = require('util');
const assert = require('assert').ok;
const kMaxLength = require('buffer').kMaxLength;
const kRangeErrorMessage = 'Cannot create final Buffer. ' +
'It would be larger than 0x' + kMaxLength.toString(16) + ' bytes.';
const kRangeErrorMessage = 'Cannot create final Buffer. It would be larger ' +
'than 0x' + kMaxLength.toString(16) + ' bytes';

// zlib doesn't provide these, so kludge them in following the same
// const naming scheme zlib uses.
Expand Down
40 changes: 20 additions & 20 deletions test/parallel/test-buffer-alloc.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,17 +536,17 @@ assert.equal('TWFu', (Buffer.from('Man')).toString('base64'));
{
// big example
const quote = 'Man is distinguished, not only by his reason, but by this ' +
'singular passion from other animals, which is a lust ' +
'of the mind, that by a perseverance of delight in the ' +
'continued and indefatigable generation of knowledge, exceeds ' +
'the short vehemence of any carnal pleasure.';
'singular passion from other animals, which is a lust ' +
'of the mind, that by a perseverance of delight in the ' +
'continued and indefatigable generation of knowledge, ' +
'exceeds the short vehemence of any carnal pleasure.';
const expected = 'TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb' +
'24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBh' +
'bmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnk' +
'gYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIG' +
'FuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBle' +
'GNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVh' +
'c3VyZS4=';
'24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlci' +
'BhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQ' +
'gYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu' +
'dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZ' +
'GdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm' +
'5hbCBwbGVhc3VyZS4=';
assert.equal(expected, (Buffer.from(quote)).toString('base64'));

let b = Buffer.allocUnsafe(1024);
Expand All @@ -556,11 +556,11 @@ assert.equal('TWFu', (Buffer.from('Man')).toString('base64'));

// check that the base64 decoder ignores whitespace
const expectedWhite = expected.slice(0, 60) + ' \n' +
expected.slice(60, 120) + ' \n' +
expected.slice(120, 180) + ' \n' +
expected.slice(180, 240) + ' \n' +
expected.slice(240, 300) + '\n' +
expected.slice(300, 360) + '\n';
expected.slice(60, 120) + ' \n' +
expected.slice(120, 180) + ' \n' +
expected.slice(180, 240) + ' \n' +
expected.slice(240, 300) + '\n' +
expected.slice(300, 360) + '\n';
b = Buffer.allocUnsafe(1024);
bytesWritten = b.write(expectedWhite, 0, 'base64');
assert.equal(quote.length, bytesWritten);
Expand All @@ -574,11 +574,11 @@ assert.equal('TWFu', (Buffer.from('Man')).toString('base64'));

// check that the base64 decoder ignores illegal chars
const expectedIllegal = expected.slice(0, 60) + ' \x80' +
expected.slice(60, 120) + ' \xff' +
expected.slice(120, 180) + ' \x00' +
expected.slice(180, 240) + ' \x98' +
expected.slice(240, 300) + '\x03' +
expected.slice(300, 360);
expected.slice(60, 120) + ' \xff' +
expected.slice(120, 180) + ' \x00' +
expected.slice(180, 240) + ' \x98' +
expected.slice(240, 300) + '\x03' +
expected.slice(300, 360);
b = Buffer.from(expectedIllegal, 'base64');
assert.equal(quote.length, b.length);
assert.equal(quote, b.toString('ascii', 0, quote.length));
Expand Down
40 changes: 20 additions & 20 deletions test/parallel/test-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,17 +533,17 @@ assert.equal('TWFu', (new Buffer('Man')).toString('base64'));
{
// big example
const quote = 'Man is distinguished, not only by his reason, but by this ' +
'singular passion from other animals, which is a lust ' +
'of the mind, that by a perseverance of delight in the ' +
'continued and indefatigable generation of knowledge, exceeds ' +
'the short vehemence of any carnal pleasure.';
'singular passion from other animals, which is a lust ' +
'of the mind, that by a perseverance of delight in the ' +
'continued and indefatigable generation of knowledge, ' +
'exceeds the short vehemence of any carnal pleasure.';
const expected = 'TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb' +
'24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBh' +
'bmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnk' +
'gYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIG' +
'FuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBle' +
'GNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVh' +
'c3VyZS4=';
'24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlci' +
'BhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQ' +
'gYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu' +
'dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZ' +
'GdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm' +
'5hbCBwbGVhc3VyZS4=';
assert.equal(expected, (new Buffer(quote)).toString('base64'));

let b = new Buffer(1024);
Expand All @@ -553,11 +553,11 @@ assert.equal('TWFu', (new Buffer('Man')).toString('base64'));

// check that the base64 decoder ignores whitespace
const expectedWhite = expected.slice(0, 60) + ' \n' +
expected.slice(60, 120) + ' \n' +
expected.slice(120, 180) + ' \n' +
expected.slice(180, 240) + ' \n' +
expected.slice(240, 300) + '\n' +
expected.slice(300, 360) + '\n';
expected.slice(60, 120) + ' \n' +
expected.slice(120, 180) + ' \n' +
expected.slice(180, 240) + ' \n' +
expected.slice(240, 300) + '\n' +
expected.slice(300, 360) + '\n';
b = new Buffer(1024);
bytesWritten = b.write(expectedWhite, 0, 'base64');
assert.equal(quote.length, bytesWritten);
Expand All @@ -571,11 +571,11 @@ assert.equal('TWFu', (new Buffer('Man')).toString('base64'));

// check that the base64 decoder ignores illegal chars
const expectedIllegal = expected.slice(0, 60) + ' \x80' +
expected.slice(60, 120) + ' \xff' +
expected.slice(120, 180) + ' \x00' +
expected.slice(180, 240) + ' \x98' +
expected.slice(240, 300) + '\x03' +
expected.slice(300, 360);
expected.slice(60, 120) + ' \xff' +
expected.slice(120, 180) + ' \x00' +
expected.slice(180, 240) + ' \x98' +
expected.slice(240, 300) + '\x03' +
expected.slice(300, 360);
b = new Buffer(expectedIllegal, 'base64');
assert.equal(quote.length, b.length);
assert.equal(quote, b.toString('ascii', 0, quote.length));
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-worker-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function checkResults(expected_results, results) {
const expected = expected_results[k];

var msg = (expected[1] || '') +
(' [expected: ' + expected[0] + ' / actual: ' + actual + ']');
(' [expected: ' + expected[0] + ' / actual: ' + actual + ']');

if (expected && expected.length) {
assert.equal(actual, expected[0], msg);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-worker-kill.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function checkResults(expected_results, results) {
const expected = expected_results[k];

var msg = (expected[1] || '') +
(' [expected: ' + expected[0] + ' / actual: ' + actual + ']');
(' [expected: ' + expected[0] + ' / actual: ' + actual + ']');
if (expected && expected.length) {
assert.equal(actual, expected[0], msg);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ if (process.argv[2] === 'child') {

child.on('exit', function onExit(exitCode, signal) {
const errMsg = 'Test at index ' + testIndex + ' should have aborted ' +
'but instead exited with exit code ' + exitCode + ' and signal ' +
signal;
'but instead exited with exit code ' + exitCode +
' and signal ' + signal;
assert(common.nodeProcessAborted(exitCode, signal), errMsg);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-error-reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var exits = 0;

function errExec(script, callback) {
var cmd = '"' + process.argv[0] + '" "' +
path.join(common.fixturesDir, script) + '"';
path.join(common.fixturesDir, script) + '"';
return exec(cmd, function(err, stdout, stderr) {
// There was some error
assert.ok(err);
Expand Down
12 changes: 6 additions & 6 deletions test/parallel/test-fs-append-file-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ var currentFileData = 'ABCD';

var num = 220;
var data = '南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,疆域包括今天中国的广东、' +
'广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。' +
'南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。' +
'前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' +
'南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' +
'历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' +
'它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n';
'广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。' +
'南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。' +
'前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' +
'南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' +
'历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' +
'它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n';

common.refreshTmpDir();

Expand Down
32 changes: 16 additions & 16 deletions test/parallel/test-http-1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ function test(handler, request_generator, response_validator) {
}

function response_validator(server_response, client_got_eof, timed_out) {
var expected_response = ('HTTP/1.1 200 OK\r\n' +
'Content-Type: text/plain\r\n' +
'Connection: close\r\n' +
'\r\n' +
'Hello, world!');
var expected_response = 'HTTP/1.1 200 OK\r\n' +
'Content-Type: text/plain\r\n' +
'Connection: close\r\n' +
'\r\n' +
'Hello, world!';

assert.equal(expected_response, server_response);
assert.equal(true, client_got_eof);
Expand Down Expand Up @@ -125,17 +125,17 @@ function test(handler, request_generator, response_validator) {
}

function response_validator(server_response, client_got_eof, timed_out) {
var expected_response = ('HTTP/1.1 200 OK\r\n' +
'Content-Type: text/plain\r\n' +
'Connection: close\r\n' +
'Transfer-Encoding: chunked\r\n' +
'\r\n' +
'7\r\n' +
'Hello, \r\n' +
'6\r\n' +
'world!\r\n' +
'0\r\n' +
'\r\n');
var expected_response = 'HTTP/1.1 200 OK\r\n' +
'Content-Type: text/plain\r\n' +
'Connection: close\r\n' +
'Transfer-Encoding: chunked\r\n' +
'\r\n' +
'7\r\n' +
'Hello, \r\n' +
'6\r\n' +
'world!\r\n' +
'0\r\n' +
'\r\n';

assert.equal(expected_response, server_response);
assert.equal(true, client_got_eof);
Expand Down
5 changes: 2 additions & 3 deletions test/parallel/test-path-parse-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,11 @@ const trailingTests = [
const failures = [];
trailingTests.forEach(function(test) {
const parse = test[0];
const os = parse === path.win32.parse ? 'win32' : 'posix';
test[1].forEach(function(test) {
const actual = parse(test[0]);
const expected = test[1];
const fn = 'path.' +
(parse === path.win32.parse ? 'win32' : 'posix') +
'.parse(';
const fn = `path.${os}.parse(`;
const message = fn +
JSON.stringify(test[0]) +
')' +
Expand Down
36 changes: 21 additions & 15 deletions test/parallel/test-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,16 @@ assert.equal(path.win32.dirname({}), '.');
].forEach(function(test) {
[path.posix.extname, path.win32.extname].forEach(function(extname) {
let input = test[0];
if (extname === path.win32.extname)
let os;
if (extname === path.win32.extname) {
input = input.replace(/\//g, '\\');
os = 'win32';
} else {
os = 'posix';
}
const actual = extname(input);
const expected = test[1];
const fn = 'path.' +
(extname === path.win32.extname ? 'win32' : 'posix') +
'.extname(';
const fn = `path.${os}.extname(`;
const message = fn + JSON.stringify(input) + ')' +
'\n expect=' + JSON.stringify(expected) +
'\n actual=' + JSON.stringify(actual);
Expand Down Expand Up @@ -319,11 +322,15 @@ joinTests.forEach(function(test) {
// For non-Windows specific tests with the Windows join(), we need to try
// replacing the slashes since the non-Windows specific tests' `expected`
// use forward slashes
const actualAlt = (join === path.win32.join) ?
actual.replace(/\\/g, '/') : undefined;
const fn = 'path.' +
(join === path.win32.join ? 'win32' : 'posix') +
'.join(';
let actualAlt;
let os;
if (join === path.win32.join) {
actualAlt = actual.replace(/\\/g, '/');
os = 'win32';
} else {
os = 'posix';
}
const fn = `path.${os}.join(`;
const message = fn + test[0].map(JSON.stringify).join(',') + ')' +
'\n expect=' + JSON.stringify(expected) +
'\n actual=' + JSON.stringify(actual);
Expand Down Expand Up @@ -424,14 +431,14 @@ resolveTests.forEach(function(test) {
test[1].forEach(function(test) {
const actual = resolve.apply(null, test[0]);
let actualAlt;
const os = resolve === path.win32.resolve ? 'win32' : 'posix';
if (resolve === path.win32.resolve && !common.isWindows)
actualAlt = actual.replace(/\\/g, '/');
else if (resolve !== path.win32.resolve && common.isWindows)
actualAlt = actual.replace(/\//g, '\\');

const expected = test[1];
const fn = 'path.' +
(resolve === path.win32.resolve ? 'win32' : 'posix') +
'.resolve(';
const fn = `path.${os}.resolve(`;
const message = fn + test[0].map(JSON.stringify).join(',') + ')' +
'\n expect=' + JSON.stringify(expected) +
'\n actual=' + JSON.stringify(actual);
Expand Down Expand Up @@ -518,9 +525,8 @@ relativeTests.forEach(function(test) {
test[1].forEach(function(test) {
const actual = relative(test[0], test[1]);
const expected = test[2];
const fn = 'path.' +
(relative === path.win32.relative ? 'win32' : 'posix') +
'.relative(';
const os = relative === path.win32.relative ? 'win32' : 'posix';
const fn = `path.${os}.relative(`;
const message = fn +
test.slice(0, 2).map(JSON.stringify).join(',') +
')' +
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-readline-undefined-columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ oStream.on('data', function(data) {

oStream.on('end', function() {
const expect = 'process.stdout\r\n' +
'process.stdin\r\n' +
'process.stderr';
'process.stdin\r\n' +
'process.stderr';
assert(new RegExp(expect).test(output));
});

Expand Down
Loading