aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/main.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs
index 8e4e1fb88..41c240139 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/main.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs
@@ -321,46 +321,3 @@ fn main() {}
321 json!([]), 321 json!([]),
322 ); 322 );
323} 323}
324
325#[test]
326fn completes_items_from_second_crate_in_json_project() {
327 let tmp_dir = TempDir::new().unwrap();
328 let code = format!(
329 r#"
330//- rust-project.json
331{{
332 "roots": [ "{PATH}" ],
333 "crates": [
334 {{
335 "root_module": "{PATH}/foo/lib.rs",
336 "deps": [
337 {{
338 "name": "bar",
339 "crate": 1
340 }}
341 ],
342 "edition": "2015"
343 }},
344 {{ "root_module": "{PATH}/bar/lib.rs", "deps": [], "edition": "2015" }}
345 ]
346}}
347
348//- bar/lib.rs
349pub struct Spam;
350pub struct CannedMeat;
351
352//- foo/lib.rs
353extern crate bar;
354use bar::Spam;
355"#,
356 PATH = tmp_dir.path().display()
357 );
358 let server = project_with_tmpdir(tmp_dir, &code);
359 server.wait_for_message("workspace loaded");
360 let res = server.send_request::<Completion>(CompletionParams {
361 text_document: server.doc_id("foo/lib.rs"),
362 context: None,
363 position: Position::new(1, 10),
364 });
365 assert!(format!("{}", res).contains("CannedMeat"));
366}