Added test-setproctitle, patched for MacOS, could need adjustement for Linux/Windows

This commit is contained in:
Jean-Francois 2014-01-09 10:39:04 +01:00
parent 4dcb3b7a68
commit 77a68fd060
3 changed files with 20 additions and 0 deletions

View File

@ -318,6 +318,7 @@
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-readline-interface.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-repl.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-script-context.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-setproctitle.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stdin-from-file.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stdout-close-catch.js"/>
<apply-diff src="test/simple" mod="${test.dir}/simple" name="test-stdout-to-file.js"/>
@ -412,6 +413,7 @@
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-readline-interface.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-repl.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-script-context.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-setproctitle.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stdin-from-file.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stdout-close-catch.js"/>
<apply-patch-file target="${test.dir}/simple" dir="test/simple" name="test-stdout-to-file.js"/>

View File

@ -0,0 +1,17 @@
--- ../node/test/simple/test-setproctitle.js 2013-08-22 13:48:54.000000000 +0200
+++ ./test/simple/test-setproctitle.js 2014-01-09 10:37:55.000000000 +0100
@@ -40,6 +40,8 @@
process.title = title;
assert.equal(process.title, title);
+// On Mac avatar-js java process name can't be changed.
+if (process.platform !== 'darwin') {
exec('ps -p ' + process.pid + ' -o args=', function(error, stdout, stderr) {
assert.equal(error, null);
assert.equal(stderr, '');
@@ -50,3 +52,4 @@
// omitting trailing whitespace and \n
assert.equal(stdout.replace(/\s+$/, ''), title);
});
+}
\ No newline at end of file

View File

@ -512,6 +512,7 @@ source.test.simple.list = \
test-script-static-new.js \
test-script-static-this.js \
test-script-this.js \
test-setproctitle.js \
test-sigint-infinite-loop.js \
test-signal-unregister.js \
test-socket-write-after-fin-error.js \