Browse Source

fix test-net-pipe-connect-errors for windows

v0.9.1-release
Igor Zinkovsky 13 years ago
parent
commit
67b10f816c
  1. 5
      test/simple/test-net-pipe-connect-errors.js

5
test/simple/test-net-pipe-connect-errors.js

@ -53,6 +53,8 @@ noEntSocketClient.on('error', function(err) {
}); });
// On Windows a chmod has no effect on named pipes
if (process.platform !== 'win32') {
// Trying to connect to a socket one has no access to should result in EACCES // Trying to connect to a socket one has no access to should result in EACCES
var accessServer = net.createServer(function() { var accessServer = net.createServer(function() {
assert.ok(false); assert.ok(false);
@ -70,12 +72,15 @@ accessServer.listen(common.PIPE, function() {
accessServer.close(); accessServer.close();
}); });
}); });
}
// Assert that all error events were fired // Assert that all error events were fired
process.on('exit', function() { process.on('exit', function() {
assert.ok(notSocketErrorFired); assert.ok(notSocketErrorFired);
assert.ok(noEntErrorFired); assert.ok(noEntErrorFired);
if (process.platform !== 'win32') {
assert.ok(accessErrorFired); assert.ok(accessErrorFired);
}
}); });

Loading…
Cancel
Save