mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
51abedecc5
PR-URL: https://github.com/nodejs/node/pull/50770 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: James M Snell <jasnell@gmail.com>
35 lines
749 B
JavaScript
35 lines
749 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const net = require('net');
|
|
|
|
if (!common.isLinux) common.skip();
|
|
|
|
const path = '\0abstract';
|
|
const message = /can not set readableAll or writableAllt to true when path is abstract unix socket/;
|
|
|
|
assert.throws(() => {
|
|
const server = net.createServer(common.mustNotCall());
|
|
server.listen({
|
|
path,
|
|
readableAll: true
|
|
});
|
|
}, message);
|
|
|
|
assert.throws(() => {
|
|
const server = net.createServer(common.mustNotCall());
|
|
server.listen({
|
|
path,
|
|
writableAll: true
|
|
});
|
|
}, message);
|
|
|
|
assert.throws(() => {
|
|
const server = net.createServer(common.mustNotCall());
|
|
server.listen({
|
|
path,
|
|
readableAll: true,
|
|
writableAll: true
|
|
});
|
|
}, message);
|