summaryrefslogtreecommitdiff
path: root/cli/js/remove_test.ts
diff options
context:
space:
mode:
authordubiousjim <dubiousjim@gmail.com>2020-03-07 22:29:12 -0500
committerGitHub <noreply@github.com>2020-03-07 22:29:12 -0500
commit0dd131d4a512e8e8370b571d6801eabb4cb30e58 (patch)
tree24471f2f1c33cd6516b0cd1bc8efeb07576b83ad /cli/js/remove_test.ts
parent8d1ba3552fbbcae9284fdab63cc6613045684d01 (diff)
Rename perm to mode (#4276)
There's a lot of variation in doc comments and internal code about whether chmod/0o777-style permissions are called `mode` or `perm`. (For example, mkdir and writeFile choose differently.) Had proposed earlier to go consistently with `perm`, but on balance devs prefer to go with `mode`.
Diffstat (limited to 'cli/js/remove_test.ts')
-rw-r--r--cli/js/remove_test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/js/remove_test.ts b/cli/js/remove_test.ts
index 1e7b31ff0..fac5ba303 100644
--- a/cli/js/remove_test.ts
+++ b/cli/js/remove_test.ts
@@ -31,7 +31,7 @@ unitTest(
const enc = new TextEncoder();
const data = enc.encode("Hello");
const filename = Deno.makeTempDirSync() + "/test.txt";
- Deno.writeFileSync(filename, data, { perm: 0o666 });
+ Deno.writeFileSync(filename, data, { mode: 0o666 });
const fileInfo = Deno.statSync(filename);
assert(fileInfo.isFile()); // check exist first
Deno.removeSync(filename); // remove
@@ -115,7 +115,7 @@ unitTest(
const tempDir = Deno.makeTempDirSync();
const filePath = tempDir + "/test.txt";
const validSymlinkPath = tempDir + "/valid_symlink";
- Deno.writeFileSync(filePath, data, { perm: 0o666 });
+ Deno.writeFileSync(filePath, data, { mode: 0o666 });
// TODO(#3832): Remove "Not Implemented" error checking when symlink creation is implemented for Windows
let errOnWindows;
try {
@@ -199,7 +199,7 @@ unitTest(
const enc = new TextEncoder();
const data = enc.encode("Hello");
const filename = Deno.makeTempDirSync() + "/test.txt";
- Deno.writeFileSync(filename, data, { perm: 0o666 });
+ Deno.writeFileSync(filename, data, { mode: 0o666 });
const fileInfo = Deno.statSync(filename);
assert(fileInfo.isFile()); // check exist first
Deno.removeSync(filename, { recursive: true }); // remove
@@ -268,7 +268,7 @@ unitTest(
const enc = new TextEncoder();
const data = enc.encode("Hello");
const filename = Deno.makeTempDirSync() + "/test.txt";
- Deno.writeFileSync(filename, data, { perm: 0o666 });
+ Deno.writeFileSync(filename, data, { mode: 0o666 });
const fileInfo = Deno.statSync(filename);
assert(fileInfo.isFile()); // check exist first
await Deno.remove(filename); // remove
@@ -351,7 +351,7 @@ unitTest(
const tempDir = Deno.makeTempDirSync();
const filePath = tempDir + "/test.txt";
const validSymlinkPath = tempDir + "/valid_symlink";
- Deno.writeFileSync(filePath, data, { perm: 0o666 });
+ Deno.writeFileSync(filePath, data, { mode: 0o666 });
// TODO(#3832): Remove "Not Implemented" error checking when symlink creation is implemented for Windows
let errOnWindows;
try {
@@ -437,7 +437,7 @@ unitTest(
const enc = new TextEncoder();
const data = enc.encode("Hello");
const filename = Deno.makeTempDirSync() + "/test.txt";
- Deno.writeFileSync(filename, data, { perm: 0o666 });
+ Deno.writeFileSync(filename, data, { mode: 0o666 });
const fileInfo = Deno.statSync(filename);
assert(fileInfo.isFile()); // check exist first
await Deno.remove(filename, { recursive: true }); // remove