@@ -394,7 +394,19 @@ TEST(function test_lookup_ipv6_hint(done) {
|
394 | 394 | family: 6, |
395 | 395 | hints: dns.V4MAPPED |
396 | 396 | }, function(err, ip, family) { |
397 | | -if (err) throw err; |
| 397 | +if (err) { |
| 398 | +// FreeBSD does not support V4MAPPED |
| 399 | +if (process.platform === 'freebsd') { |
| 400 | +assert(err instanceof Error); |
| 401 | +assert.strictEqual(err.code, 'EAI_BADFLAGS'); |
| 402 | +assert.strictEqual(err.hostname, 'www.google.com'); |
| 403 | +assert.ok(/getaddrinfo EAI_BADFLAGS/.test(err.message)); |
| 404 | +done(); |
| 405 | +return; |
| 406 | +} else { |
| 407 | +throw err; |
| 408 | +} |
| 409 | +} |
398 | 410 | assert.ok(net.isIPv6(ip)); |
399 | 411 | assert.strictEqual(family, 6); |
400 | 412 | |
|