Browse Source

test: fix simple/test-setproctitle on freebsd

v0.9.4-release
Ben Noordhuis 12 years ago
parent
commit
9d02bfbc25
  1. 4
      test/simple/test-setproctitle.js

4
test/simple/test-setproctitle.js

@ -40,6 +40,10 @@ assert.equal(process.title, title);
exec('ps -p ' + process.pid + ' -o args=', function(error, stdout, stderr) {
assert.equal(error, null);
assert.equal(stderr, '');
// freebsd always add ' (procname)' to the process title
if (process.platform === 'freebsd') title += ' (node)';
// omitting trailing whitespace and \n
assert.equal(stdout.replace(/\s+$/, ''), title);
});

Loading…
Cancel
Save