Add --allow-read (#1689)

Co-authored-by: Greg Altman <g.s.altman@gmail.com>
This commit is contained in:
Dmitry Sharshakov 2019-02-08 23:59:38 +03:00 committed by Ryan Dahl
parent 3abaf9edb6
commit 9ab03389f0
25 changed files with 395 additions and 118 deletions

View file

@ -16,7 +16,7 @@ async function readData(name: string): Promise<string> {
return text;
}
testPerm({ write: true }, function truncateSyncSuccess() {
testPerm({ read: true, write: true }, function truncateSyncSuccess() {
const enc = new TextEncoder();
const d = enc.encode("Hello");
const filename = deno.makeTempDirSync() + "/test_truncateSync.txt";
@ -33,7 +33,7 @@ testPerm({ write: true }, function truncateSyncSuccess() {
deno.removeSync(filename);
});
testPerm({ write: true }, async function truncateSuccess() {
testPerm({ read: true, write: true }, async function truncateSuccess() {
const enc = new TextEncoder();
const d = enc.encode("Hello");
const filename = deno.makeTempDirSync() + "/test_truncate.txt";