mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 21:50:00 -05:00
parent
1b7d5937d9
commit
9cac5601b8
1 changed files with 3 additions and 3 deletions
|
@ -1111,7 +1111,6 @@ supported in canary.
|
||||||
)
|
)
|
||||||
.defer(|cmd| {
|
.defer(|cmd| {
|
||||||
runtime_args(cmd, true, false)
|
runtime_args(cmd, true, false)
|
||||||
.arg(script_arg().required(true))
|
|
||||||
.arg(check_arg(true))
|
.arg(check_arg(true))
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("include")
|
Arg::new("include")
|
||||||
|
@ -1152,6 +1151,7 @@ supported in canary.
|
||||||
.action(ArgAction::SetTrue),
|
.action(ArgAction::SetTrue),
|
||||||
)
|
)
|
||||||
.arg(executable_ext_arg())
|
.arg(executable_ext_arg())
|
||||||
|
.arg(script_arg().required(true).trailing_var_arg(true))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7262,14 +7262,14 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn compile_with_flags() {
|
fn compile_with_flags() {
|
||||||
#[rustfmt::skip]
|
#[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!(
|
assert_eq!(
|
||||||
r.unwrap(),
|
r.unwrap(),
|
||||||
Flags {
|
Flags {
|
||||||
subcommand: DenoSubcommand::Compile(CompileFlags {
|
subcommand: DenoSubcommand::Compile(CompileFlags {
|
||||||
source_file: "https://deno.land/std/examples/colors.ts".to_string(),
|
source_file: "https://deno.land/std/examples/colors.ts".to_string(),
|
||||||
output: Some(PathBuf::from("colors")),
|
output: Some(PathBuf::from("colors")),
|
||||||
args: svec!["foo", "bar"],
|
args: svec!["foo", "bar", "-p", "8080"],
|
||||||
target: None,
|
target: None,
|
||||||
no_terminal: true,
|
no_terminal: true,
|
||||||
include: vec![]
|
include: vec![]
|
||||||
|
|
Loading…
Add table
Reference in a new issue