summaryrefslogtreecommitdiff
path: root/tests/specs/permission/path_not_permitted/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/permission/path_not_permitted/main.ts')
-rw-r--r--tests/specs/permission/path_not_permitted/main.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/specs/permission/path_not_permitted/main.ts b/tests/specs/permission/path_not_permitted/main.ts
new file mode 100644
index 000000000..9e8d627f2
--- /dev/null
+++ b/tests/specs/permission/path_not_permitted/main.ts
@@ -0,0 +1,18 @@
+const binaryName = Deno.build.os === "windows" ? "deno.exe" : "deno";
+Deno.copyFileSync(Deno.execPath(), binaryName);
+
+console.log("Running...");
+new Deno.Command(
+ Deno.execPath(),
+ {
+ args: [
+ "run",
+ "--allow-write",
+ "--allow-read",
+ `--allow-run=${binaryName}`,
+ "sub.ts",
+ ],
+ stderr: "inherit",
+ stdout: "inherit",
+ },
+).outputSync();