aboutsummaryrefslogtreecommitdiff
path: root/crates/server/tests/heavy_tests/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/server/tests/heavy_tests/main.rs')
-rw-r--r--crates/server/tests/heavy_tests/main.rs36
1 files changed, 34 insertions, 2 deletions
diff --git a/crates/server/tests/heavy_tests/main.rs b/crates/server/tests/heavy_tests/main.rs
index 94c8243b0..9c0196f22 100644
--- a/crates/server/tests/heavy_tests/main.rs
+++ b/crates/server/tests/heavy_tests/main.rs
@@ -1,5 +1,6 @@
1extern crate tempdir; 1#[macro_use]
2extern crate crossbeam_channel; 2extern crate crossbeam_channel;
3extern crate tempdir;
3extern crate languageserver_types; 4extern crate languageserver_types;
4extern crate serde; 5extern crate serde;
5extern crate serde_json; 6extern crate serde_json;
@@ -9,10 +10,12 @@ extern crate m;
9 10
10mod support; 11mod support;
11 12
12use m::req::{Runnables, RunnablesParams}; 13use m::req::{Runnables, RunnablesParams, DidReloadWorkspace};
13 14
14use support::project; 15use support::project;
15 16
17const LOG: &'static str = "WARN";
18
16#[test] 19#[test]
17fn test_runnables() { 20fn test_runnables() {
18 let server = project(r" 21 let server = project(r"
@@ -40,3 +43,32 @@ fn foo() {
40 ]"# 43 ]"#
41 ); 44 );
42} 45}
46
47#[test]
48fn test_project_model() {
49 let server = project(r#"
50//- Cargo.toml
51[package]
52name = "foo"
53version = "0.0.0"
54
55//- src/lib.rs
56pub fn foo() {}
57"#);
58 server.notification::<DidReloadWorkspace>(r#"[
59 {
60 "packages": [
61 {
62 "manifest": "$PROJECT_ROOT$/Cargo.toml",
63 "name": "foo",
64 "targets": [ 0 ]
65 }
66 ],
67 "targets": [
68 { "kind": "Lib", "name": "foo", "pkg": 0, "root": "$PROJECT_ROOT$/src/lib.rs" }
69 ],
70 "ws_members": [ 0 ]
71 }
72]"#
73 );
74}