diff options
author | Ahab <ahabhgk@gmail.com> | 2021-10-03 01:09:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-02 19:09:59 +0200 |
commit | 198f5b95140b52b5a3aad343e62fc0c9b03b9ae7 (patch) | |
tree | cab6dd9fad41bee34972ce44fa58829d7b5687a4 /cli/tests/unit/net_test.ts | |
parent | 21520f5ff1bee719f2a9b03e70b00b6a4e0f1ee2 (diff) |
fix(ext/net): should not panic when listening to unix abstract address (#12300)
Diffstat (limited to 'cli/tests/unit/net_test.ts')
-rw-r--r-- | cli/tests/unit/net_test.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/unit/net_test.ts b/cli/tests/unit/net_test.ts index 180f8d88e..a1585ce6b 100644 --- a/cli/tests/unit/net_test.ts +++ b/cli/tests/unit/net_test.ts @@ -625,3 +625,18 @@ unitTest( listener.close(); }, ); + +unitTest( + { + ignore: Deno.build.os !== "linux", + permissions: { read: true, write: true }, + }, + function netUnixAbstractPathShouldNotPanic() { + const listener = Deno.listen({ + path: "\0aaa", + transport: "unix", + }); + assert("not panic"); + listener.close(); + }, +); |