test: fix dgram-bind-default-address on osx

Allow the IPv4-mapped-as-IPv6 style address.
pull/5010/head
isaacs 2013-04-19 08:32:24 -07:00
parent 4bf1d1007f
commit 1d794ec43e
1 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,9 @@ dgram.createSocket('udp4').bind(common.PORT + 0, common.mustCall(function() {
dgram.createSocket('udp6').bind(common.PORT + 1, common.mustCall(function() {
assert.equal(this.address().port, common.PORT + 1);
assert.equal(this.address().address, '::');
var address = this.address().address;
if (address === '::ffff:0.0.0.0')
address = '::';
assert.equal(address, '::');
this.close();
}));