summaryrefslogtreecommitdiff
path: root/cli/tests/unit/process_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/process_test.ts')
-rw-r--r--cli/tests/unit/process_test.ts54
1 files changed, 30 insertions, 24 deletions
diff --git a/cli/tests/unit/process_test.ts b/cli/tests/unit/process_test.ts
index 9f8e9cd9f..9012274c3 100644
--- a/cli/tests/unit/process_test.ts
+++ b/cli/tests/unit/process_test.ts
@@ -7,14 +7,14 @@ import {
unitTest,
} from "./test_util.ts";
-unitTest({ perms: { read: true } }, function runPermissions() {
+unitTest({ permissions: { read: true } }, function runPermissions() {
assertThrows(() => {
Deno.run({ cmd: [Deno.execPath(), "eval", "console.log('hello world')"] });
}, Deno.errors.PermissionDenied);
});
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runSuccess() {
const p = Deno.run({
cmd: [Deno.execPath(), "eval", "console.log('hello world')"],
@@ -31,7 +31,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runUrl() {
const p = Deno.run({
cmd: [
@@ -52,7 +52,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runStdinRid0(): Promise<
void
> {
@@ -72,7 +72,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
function runInvalidStdio() {
assertThrows(() =>
Deno.run({
@@ -99,7 +99,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runCommandFailedWithCode() {
const p = Deno.run({
cmd: [Deno.execPath(), "eval", "Deno.exit(41 + 1)"],
@@ -116,7 +116,7 @@ unitTest(
{
// No signals on windows.
ignore: Deno.build.os === "windows",
- perms: { run: true, read: true },
+ permissions: { run: true, read: true },
},
async function runCommandFailedWithSignal() {
const p = Deno.run({
@@ -135,7 +135,7 @@ unitTest(
},
);
-unitTest({ perms: { run: true } }, function runNotFound() {
+unitTest({ permissions: { run: true } }, function runNotFound() {
let error;
try {
Deno.run({ cmd: ["this file hopefully doesn't exist"] });
@@ -147,7 +147,7 @@ unitTest({ perms: { run: true } }, function runNotFound() {
});
unitTest(
- { perms: { write: true, run: true, read: true } },
+ { permissions: { write: true, run: true, read: true } },
async function runWithCwdIsAsync() {
const enc = new TextEncoder();
const cwd = await Deno.makeTempDir({ prefix: "deno_command_test" });
@@ -188,7 +188,7 @@ tryExit();
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runStdinPiped(): Promise<
void
> {
@@ -219,7 +219,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runStdoutPiped(): Promise<
void
> {
@@ -255,7 +255,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runStderrPiped(): Promise<
void
> {
@@ -291,7 +291,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runOutput() {
const p = Deno.run({
cmd: [
@@ -309,7 +309,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runStderrOutput(): Promise<
void
> {
@@ -329,7 +329,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, write: true, read: true } },
+ { permissions: { run: true, write: true, read: true } },
async function runRedirectStdoutStderr() {
const tempDir = await Deno.makeTempDir();
const fileName = tempDir + "/redirected_stdio.txt";
@@ -362,7 +362,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, write: true, read: true } },
+ { permissions: { run: true, write: true, read: true } },
async function runRedirectStdin() {
const tempDir = await Deno.makeTempDir();
const fileName = tempDir + "/redirected_stdio.txt";
@@ -387,7 +387,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runEnv() {
const p = Deno.run({
cmd: [
@@ -409,7 +409,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runClose() {
const p = Deno.run({
cmd: [
@@ -432,7 +432,7 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function runKillAfterStatus() {
const p = Deno.run({
cmd: [Deno.execPath(), "eval", 'console.log("hello")'],
@@ -468,7 +468,7 @@ unitTest(function killPermissions() {
});
unitTest(
- { perms: { run: true, read: true } },
+ { permissions: { run: true, read: true } },
async function killSuccess() {
const p = Deno.run({
cmd: [Deno.execPath(), "eval", "setTimeout(() => {}, 10000)"],
@@ -494,7 +494,7 @@ unitTest(
},
);
-unitTest({ perms: { run: true, read: true } }, function killFailed() {
+unitTest({ permissions: { run: true, read: true } }, function killFailed() {
const p = Deno.run({
cmd: [Deno.execPath(), "eval", "setTimeout(() => {}, 10000)"],
});
@@ -511,7 +511,7 @@ unitTest({ perms: { run: true, read: true } }, function killFailed() {
});
unitTest(
- { perms: { run: true, read: true, env: true } },
+ { permissions: { run: true, read: true, env: true } },
async function clearEnv(): Promise<void> {
const p = Deno.run({
cmd: [
@@ -539,7 +539,10 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true }, ignore: Deno.build.os === "windows" },
+ {
+ permissions: { run: true, read: true },
+ ignore: Deno.build.os === "windows",
+ },
async function uid(): Promise<void> {
const p = Deno.run({
cmd: [
@@ -567,7 +570,10 @@ unitTest(
);
unitTest(
- { perms: { run: true, read: true }, ignore: Deno.build.os === "windows" },
+ {
+ permissions: { run: true, read: true },
+ ignore: Deno.build.os === "windows",
+ },
async function gid(): Promise<void> {
const p = Deno.run({
cmd: [