diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2022-11-24 14:00:31 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 03:00:31 +0000 |
commit | fe7e3a12ca02792215f7598302c42113bcdc4458 (patch) | |
tree | 1bea37db723f77c96eec000ece5c738ab6f0eef8 /cli/tests/integration/run_tests.rs | |
parent | beaa0d88679c96e643f411d04a4ce9f6d159eaeb (diff) |
feat(cli): add warning for incorrectly ordered flags (#16734)
This code checks if permission flags are incorrectly defined after the
module name (e.g. `deno run mod.ts --allow-read` instead of the correct
`deno run --allow-read mod.ts`). If so, a simple warning is displayed.
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 11 |
1 files changed, 11 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", +}); |