diff options
author | Dmitry Sharshakov <sh7dm@outlook.com> | 2019-02-08 23:59:38 +0300 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-08 15:59:38 -0500 |
commit | 9ab03389f047e5520c184b9fce4cd5fb2e4804bd (patch) | |
tree | c1b3295aa6788595e4b73d28aeba0b8fdc8f3205 /js/mkdir_test.ts | |
parent | 3abaf9edb6877c328402b94fa0bcb6a9e0bbe86d (diff) |
Add --allow-read (#1689)
Co-authored-by: Greg Altman <g.s.altman@gmail.com>
Diffstat (limited to 'js/mkdir_test.ts')
-rw-r--r-- | js/mkdir_test.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/mkdir_test.ts b/js/mkdir_test.ts index 8b36c18f9..e88181485 100644 --- a/js/mkdir_test.ts +++ b/js/mkdir_test.ts @@ -2,14 +2,14 @@ import { testPerm, assert, assertEqual } from "./test_util.ts"; import * as deno from "deno"; -testPerm({ write: true }, function mkdirSyncSuccess() { +testPerm({ read: true, write: true }, function mkdirSyncSuccess() { const path = deno.makeTempDirSync() + "/dir"; deno.mkdirSync(path); const pathInfo = deno.statSync(path); assert(pathInfo.isDirectory()); }); -testPerm({ write: true }, function mkdirSyncMode() { +testPerm({ read: true, write: true }, function mkdirSyncMode() { const path = deno.makeTempDirSync() + "/dir"; deno.mkdirSync(path, false, 0o755); // no perm for x const pathInfo = deno.statSync(path); @@ -30,7 +30,7 @@ testPerm({ write: false }, function mkdirSyncPerm() { assertEqual(err.name, "PermissionDenied"); }); -testPerm({ write: true }, async function mkdirSuccess() { +testPerm({ read: true, write: true }, async function mkdirSuccess() { const path = deno.makeTempDirSync() + "/dir"; await deno.mkdir(path); const pathInfo = deno.statSync(path); @@ -48,14 +48,14 @@ testPerm({ write: true }, function mkdirErrIfExists() { assertEqual(err.name, "AlreadyExists"); }); -testPerm({ write: true }, function mkdirSyncRecursive() { +testPerm({ read: true, write: true }, function mkdirSyncRecursive() { const path = deno.makeTempDirSync() + "/nested/directory"; deno.mkdirSync(path, true); const pathInfo = deno.statSync(path); assert(pathInfo.isDirectory()); }); -testPerm({ write: true }, async function mkdirRecursive() { +testPerm({ read: true, write: true }, async function mkdirRecursive() { const path = deno.makeTempDirSync() + "/nested/directory"; await deno.mkdir(path, true); const pathInfo = deno.statSync(path); |