aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 012f74270..11825d74e 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -256,6 +256,7 @@ pub fn handle_runnables(
256 range: runnable.range.conv_with(&line_index), 256 range: runnable.range.conv_with(&line_index),
257 label: match &runnable.kind { 257 label: match &runnable.kind {
258 RunnableKind::Test { name } => format!("test {}", name), 258 RunnableKind::Test { name } => format!("test {}", name),
259 RunnableKind::TestMod { path } => format!("test-mod {}", path),
259 RunnableKind::Bin => "run binary".to_string(), 260 RunnableKind::Bin => "run binary".to_string(),
260 }, 261 },
261 bin: "cargo".to_string(), 262 bin: "cargo".to_string(),
@@ -307,6 +308,15 @@ pub fn handle_runnables(
307 res.push(name.to_string()); 308 res.push(name.to_string());
308 res.push("--nocapture".to_string()); 309 res.push("--nocapture".to_string());
309 } 310 }
311 RunnableKind::TestMod { path } => {
312 res.push("test".to_string());
313 if let Some(spec) = spec {
314 spec.push_to(&mut res);
315 }
316 res.push("--".to_string());
317 res.push(path.to_string());
318 res.push("--nocapture".to_string());
319 }
310 RunnableKind::Bin => { 320 RunnableKind::Bin => {
311 res.push("run".to_string()); 321 res.push("run".to_string());
312 if let Some(spec) = spec { 322 if let Some(spec) = spec {