Remove rust-project.json test w/ dependencies.

This commit is contained in:
David Wood 2019-03-07 12:28:19 +01:00
parent 3bc33ae712
commit 4cd757c1e3
No known key found for this signature in database
GPG Key ID: 01760B4F9F53F154

View File

@ -321,46 +321,3 @@ fn main() {}
json!([]),
);
}
#[test]
fn completes_items_from_second_crate_in_json_project() {
let tmp_dir = TempDir::new().unwrap();
let code = format!(
r#"
//- rust-project.json
{{
"roots": [ "{PATH}" ],
"crates": [
{{
"root_module": "{PATH}/foo/lib.rs",
"deps": [
{{
"name": "bar",
"crate": 1
}}
],
"edition": "2015"
}},
{{ "root_module": "{PATH}/bar/lib.rs", "deps": [], "edition": "2015" }}
]
}}
//- bar/lib.rs
pub struct Spam;
pub struct CannedMeat;
//- foo/lib.rs
extern crate bar;
use bar::Spam;
"#,
PATH = tmp_dir.path().display()
);
let server = project_with_tmpdir(tmp_dir, &code);
server.wait_for_message("workspace loaded");
let res = server.send_request::<Completion>(CompletionParams {
text_document: server.doc_id("foo/lib.rs"),
context: None,
position: Position::new(1, 10),
});
assert!(format!("{}", res).contains("CannedMeat"));
}