fix test for Windows, process exports some functions only on non windows platform

This commit is contained in:
jfdenise 2014-01-20 10:00:24 +01:00
parent 7b154c9ee5
commit 46d94eedab
1 changed files with 7 additions and 6 deletions

View File

@ -58,16 +58,19 @@ process.features;
testThrow(function() { process.getgid(); } );
// requires process permission
testThrow(function() { process.getgroups(); } );
if (exports.platform !== 'win32') {
testThrow(function() { process.getgroups(); } );
// requires process permission
testThrow(function() { process.initgroups(999, 999); } );
// requires process permission
testThrow(function() { process.setgroups([999]); } );
}
// requires process permission
testThrow(function() { process.getuid(); } );
process.hrtime;
// requires process permission
testThrow(function() { process.initgroups(999, 999); } );
// requires libUV permission
testThrow(function() { process.kill(999, 0); } );
@ -81,8 +84,6 @@ process.pid;
// requires process permission
testThrow(function() { process.setgid(999); } );
// requires process permission
testThrow(function() { process.setgroups([999]); } );
// requires process permission
testThrow(function() { process.setuid(999); } );