From 2fec1f723552b9ae99d6a49998db910734172c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 15 Aug 2019 16:44:53 +0200 Subject: [PATCH 1/3] bump test runner version --- cli/flags.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/flags.rs b/cli/flags.rs index e1cd3dffcbc550..faf70954e97ea1 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -682,7 +682,7 @@ const PRETTIER_URL: &str = "https://deno.land/std@v0.11/prettier/main.ts"; /// Used for `deno install...` subcommand const INSTALLER_URL: &str = "https://deno.land/std@v0.11/installer/mod.ts"; /// Used for `deno test...` subcommand -const TEST_RUNNER_URL: &str = "https://deno.land/std@c44e536/testing/runner.ts"; +const TEST_RUNNER_URL: &str = "https://deno.land/std@15afc61/testing/runner.ts"; /// These are currently handled subcommands. /// There is no "Help" subcommand because it's handled by `clap::App` itself. From eb8c67ebf21457701e2f9d5414205ef45fe58bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 15 Aug 2019 22:21:27 +0200 Subject: [PATCH 2/3] add test case for deno test --- cli/flags.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cli/flags.rs b/cli/flags.rs index faf70954e97ea1..b1e3ed5be6d3c3 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -1743,4 +1743,27 @@ mod tests { assert_eq!(subcommand, DenoSubcommand::Run); assert_eq!(argv, svec!["deno", "script.ts"]) } + + #[test] + fn test_flags_from_vec_36() { + let (flags, subcommand, argv) = flags_from_vec(svec![ + "deno", + "test", + "--exclude", + "some_dir/", + "**/*_test.ts" + ]); + assert_eq!(flags, DenoFlags::default()); + assert_eq!(subcommand, DenoSubcommand::Run); + assert_eq!( + argv, + svec![ + "deno", + TEST_RUNNER_URL, + "--exclude", + "some_dir/", + "**/*_test.ts" + ] + ) + } } From cdf41c869aa302069044dcf76c2b1628c452e0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 15 Aug 2019 22:47:05 +0200 Subject: [PATCH 3/3] fix test --- cli/flags.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/flags.rs b/cli/flags.rs index b1e3ed5be6d3c3..5cffd1994b080e 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -1753,7 +1753,13 @@ mod tests { "some_dir/", "**/*_test.ts" ]); - assert_eq!(flags, DenoFlags::default()); + assert_eq!( + flags, + DenoFlags { + allow_read: true, + ..DenoFlags::default() + } + ); assert_eq!(subcommand, DenoSubcommand::Run); assert_eq!( argv,