diff options
author | David Wood <[email protected]> | 2019-03-07 11:28:19 +0000 |
---|---|---|
committer | David Wood <[email protected]> | 2019-03-07 11:28:19 +0000 |
commit | 4cd757c1e32f0cf1f281b82cd55615d0e47edb24 (patch) | |
tree | 53e570017ba84d2a7fdf91bfbcf89ef0e30bb5db /crates/ra_lsp_server | |
parent | 3bc33ae712d24f19f348828b0b18cda3d09a2360 (diff) |
Remove rust-project.json test w/ dependencies.
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/main.rs | 43 |
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] | ||
326 | fn 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 | ||
349 | pub struct Spam; | ||
350 | pub struct CannedMeat; | ||
351 | |||
352 | //- foo/lib.rs | ||
353 | extern crate bar; | ||
354 | use 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 | } | ||