]> git.lizzy.rs Git - rust.git/commitdiff
Test/check the whole package
authorAleksey Kladov <aleksey.kladov@gmail.com>
Sat, 2 May 2020 08:57:37 +0000 (10:57 +0200)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Sat, 2 May 2020 08:57:37 +0000 (10:57 +0200)
Closes #4255

crates/rust-analyzer/src/main_loop/handlers.rs
crates/rust-analyzer/tests/heavy_tests/main.rs

index 0f623949ecb84432808ec69d7e16fe7426273fdd..914062902b9b140482b27aeb00385da92c978491 100644 (file)
@@ -400,11 +400,7 @@ pub fn handle_runnables(
                     range: Default::default(),
                     label: format!("cargo {} -p {}", cmd, spec.package),
                     bin: "cargo".to_string(),
-                    args: {
-                        let mut args = vec![cmd.to_string()];
-                        spec.clone().push_to(&mut args);
-                        args
-                    },
+                    args: vec![cmd.to_string(), "--package".to_string(), spec.package.clone()],
                     extra_args: Vec::new(),
                     env: FxHashMap::default(),
                     cwd: workspace_root.map(|root| root.to_owned()),
index 07b8114c613996d15b47ccaf92c4c23ef49f80bc..a218da76d6c579eed35503dd29a138d51ce83cc5 100644 (file)
@@ -149,7 +149,7 @@ fn main() {}
               "cwd": server.path().join("foo")
             },
             {
-              "args": [ "check", "--package", "foo", "--test", "spam" ],
+              "args": [ "check", "--package", "foo" ],
               "extraArgs": [],
               "bin": "cargo",
               "env": {},
@@ -161,7 +161,7 @@ fn main() {}
               "cwd": server.path().join("foo")
             },
             {
-              "args": [ "test", "--package", "foo", "--test", "spam" ],
+              "args": [ "test", "--package", "foo" ],
               "extraArgs": [],
               "bin": "cargo",
               "env": {},