summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/run_tests.rs11
-rw-r--r--cli/tests/testdata/run/permission_args.out4
2 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 192fff620..866fd2793 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -3647,3 +3647,14 @@ itest!(flash_shutdown {
args: "run --unstable --allow-net run/flash_shutdown/main.ts",
exit_code: 0,
});
+
+itest!(permission_args {
+ args: "run run/001_hello.js --allow-net",
+ output: "run/permission_args.out",
+ envs: vec![("NO_COLOR".to_string(), "1".to_string())],
+});
+
+itest!(permission_args_quiet {
+ args: "run --quiet run/001_hello.js --allow-net",
+ output: "run/001_hello.js.out",
+});
diff --git a/cli/tests/testdata/run/permission_args.out b/cli/tests/testdata/run/permission_args.out
new file mode 100644
index 000000000..6a1e1787c
--- /dev/null
+++ b/cli/tests/testdata/run/permission_args.out
@@ -0,0 +1,4 @@
+Permission flags have likely been incorrectly set after the script argument.
+To grant permissions, set them before the script argument. For example:
+ deno run --allow-read=. main.js
+Hello World