aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/main.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs
index 6ae541ec6..407719080 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/main.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs
@@ -263,20 +263,25 @@ fn main() {}
263#[test] 263#[test]
264fn test_missing_module_code_action_in_json_project() { 264fn test_missing_module_code_action_in_json_project() {
265 let tmp_dir = TempDir::new().unwrap(); 265 let tmp_dir = TempDir::new().unwrap();
266
267 let path = tmp_dir.path();
268
269 let project = json!({
270 "roots": [path],
271 "crates": [ { "root_module": path.join("src/lib.rs"), "deps": [], "edition": "2015" } ]
272 });
273
266 let code = format!( 274 let code = format!(
267 r#" 275 r#"
268//- rust-project.json 276//- rust-project.json
269{{ 277{PROJECT}
270 "roots": [ "{PATH}" ],
271 "crates": [ {{ "root_module": "{PATH}/src/lib.rs", "deps": [], "edition": "2015" }} ]
272}}
273 278
274//- src/lib.rs 279//- src/lib.rs
275mod bar; 280mod bar;
276 281
277fn main() {} 282fn main() {{}}
278"#, 283"#,
279 PATH = tmp_dir.path().display() 284 PROJECT = project.to_string(),
280 ); 285 );
281 let server = project_with_tmpdir(tmp_dir, &code); 286 let server = project_with_tmpdir(tmp_dir, &code);
282 server.wait_until_workspace_is_loaded(); 287 server.wait_until_workspace_is_loaded();