From 9ea5a4c468fe290f00b6ebc78c33c2a60cc53625 Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Mon, 5 Mar 2012 16:50:21 -0800 Subject: [PATCH] fix simple/test-process-argv-0 on windows --- test/simple/test-process-argv-0.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/simple/test-process-argv-0.js b/test/simple/test-process-argv-0.js index fa5b6876c0..0c38f6ac7b 100644 --- a/test/simple/test-process-argv-0.js +++ b/test/simple/test-process-argv-0.js @@ -42,7 +42,12 @@ if (process.argv[2] !== "child") { }); child.on('exit', function () { console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: ')); - assert.equal(childArgv0, process.execPath); + if (process.platform === 'win32') { + // On Windows argv[0] is not expanded into full path + assert.equal(childArgv0, './node'); + } else { + assert.equal(childArgv0, process.execPath); + } }); } else {