mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
test: fix bug in setproctitle test
Output from `ps` may contain trailing whitespace, trim it.
This commit is contained in:
1 parent
4908e5bf7a
commit
2f8596ee10
1 file changed
+2
-2
@@ -39,6 +39,6 @@ assert.equal(process.title, title);
|
||||
exec('ps -p ' + process.pid + ' -o args=', function(error, stdout, stderr) {
|
||||
assert.equal(error, null);
|
||||
assert.equal(stderr, '');
|
||||
// omitting trailing \n
|
||||
assert.equal(stdout.substring(0, stdout.length - 1), title);
|
||||
// omitting trailing whitespace and \n
|
||||
assert.equal(stdout.replace(/\s+$/, ''), title);
|
||||
});
|
||||
Reference in new issue
Block a user