diff options
author | Ry Dahl <ry@tinyclouds.org> | 2019-11-26 08:06:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-26 08:06:32 -0800 |
commit | c016684653df45c3c3bc88d79dfc295ea5c6426f (patch) | |
tree | 3cced64c9bace85163f5b4b0f4882a6548fa2905 /cli/tests/integration_tests.rs | |
parent | f88dc4e197f36842b13843dd88da3d74d67578e5 (diff) |
refactor: reorganize flags (#3389)
- Remove ability to specify run arguments like `--allow-net` after the
script argument. It's too hacky to make work with clap.
- Remove `--v8-options`, instead use `--v8-flags=--help`
- Give more descriptive names to unit tests in flags.rs
- Assume argv and subcommand into DenoFlags struct so the output of
flags module is only DenoFlags rather than the tuple (subcommand, flags,
argv).
- Improve CLI help text
- Make `deno run` specific args like `--allow-net` only show up in 'deno
help run' instead of as global flags in `deno help`.
- Removes `deno version` to simplify our implementation and be closer to
clap defaults. `deno -V` now only shows Deno's version and not V8's nor
TypeScript. `Deno.versions` can be used to see that information.
- Prevent clap from auto-detecting terminal width and attempting to wrap
text.
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r-- | cli/tests/integration_tests.rs | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 7fd7a396b..3cc8039db 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -168,17 +168,17 @@ itest!(_012_async { }); itest!(_013_dynamic_import { - args: "013_dynamic_import.ts --reload --allow-read", + args: "run --reload --allow-read 013_dynamic_import.ts", output: "013_dynamic_import.ts.out", }); itest!(_014_duplicate_import { - args: "014_duplicate_import.ts --reload --allow-read", + args: "run --reload --allow-read 014_duplicate_import.ts ", output: "014_duplicate_import.ts.out", }); itest!(_015_duplicate_parallel_import { - args: "015_duplicate_parallel_import.js --reload --allow-read", + args: "run --reload --allow-read 015_duplicate_parallel_import.js", output: "015_duplicate_parallel_import.js.out", }); @@ -418,7 +418,7 @@ itest!(lock_check_err { }); itest!(lock_check_err2 { - args: "run 019_media_types.ts --lock=lock_check_err2.json", + args: "run --lock=lock_check_err2.json 019_media_types.ts", output: "lock_check_err2.out", check_stderr: true, exit_code: 10, @@ -538,7 +538,7 @@ itest!(error_013_missing_script { }); itest!(error_014_catch_dynamic_import_error { - args: "error_014_catch_dynamic_import_error.js --reload --allow-read", + args: "run --reload --allow-read error_014_catch_dynamic_import_error.js", output: "error_014_catch_dynamic_import_error.js.out", exit_code: 1, }); @@ -641,25 +641,10 @@ itest!(v8_flags { }); itest!(v8_help { - args: "--v8-options", + args: "run --v8-flags=--help", output: "v8_help.out", }); -itest!(version { - args: "version", - output: "version.out", -}); - -itest!(version_long_flag { - args: "--version", - output: "version.out", -}); - -itest!(version_short_flag { - args: "-v", - output: "version.out", -}); - itest!(wasm { args: "run wasm.ts", output: "wasm.ts.out", |