mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
parent
1b7d5937d9
commit
9cac5601b8
1 changed files with 3 additions and 3 deletions
|
@ -1111,7 +1111,6 @@ supported in canary.
|
|||
)
|
||||
.defer(|cmd| {
|
||||
runtime_args(cmd, true, false)
|
||||
.arg(script_arg().required(true))
|
||||
.arg(check_arg(true))
|
||||
.arg(
|
||||
Arg::new("include")
|
||||
|
@ -1152,6 +1151,7 @@ supported in canary.
|
|||
.action(ArgAction::SetTrue),
|
||||
)
|
||||
.arg(executable_ext_arg())
|
||||
.arg(script_arg().required(true).trailing_var_arg(true))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -7262,14 +7262,14 @@ mod tests {
|
|||
#[test]
|
||||
fn compile_with_flags() {
|
||||
#[rustfmt::skip]
|
||||
let r = flags_from_vec(svec!["deno", "compile", "--import-map", "import_map.json", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--lock-write", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--output", "colors", "https://deno.land/std/examples/colors.ts", "foo", "bar"]);
|
||||
let r = flags_from_vec(svec!["deno", "compile", "--import-map", "import_map.json", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--lock-write", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--output", "colors", "https://deno.land/std/examples/colors.ts", "foo", "bar", "-p", "8080"]);
|
||||
assert_eq!(
|
||||
r.unwrap(),
|
||||
Flags {
|
||||
subcommand: DenoSubcommand::Compile(CompileFlags {
|
||||
source_file: "https://deno.land/std/examples/colors.ts".to_string(),
|
||||
output: Some(PathBuf::from("colors")),
|
||||
args: svec!["foo", "bar"],
|
||||
args: svec!["foo", "bar", "-p", "8080"],
|
||||
target: None,
|
||||
no_terminal: true,
|
||||
include: vec![]
|
||||
|
|
Loading…
Reference in a new issue