diff options
Diffstat (limited to 'crates/server/tests/heavy_tests/main.rs')
-rw-r--r-- | crates/server/tests/heavy_tests/main.rs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/crates/server/tests/heavy_tests/main.rs b/crates/server/tests/heavy_tests/main.rs new file mode 100644 index 000000000..94c8243b0 --- /dev/null +++ b/crates/server/tests/heavy_tests/main.rs | |||
@@ -0,0 +1,42 @@ | |||
1 | extern crate tempdir; | ||
2 | extern crate crossbeam_channel; | ||
3 | extern crate languageserver_types; | ||
4 | extern crate serde; | ||
5 | extern crate serde_json; | ||
6 | extern crate gen_lsp_server; | ||
7 | extern crate flexi_logger; | ||
8 | extern crate m; | ||
9 | |||
10 | mod support; | ||
11 | |||
12 | use m::req::{Runnables, RunnablesParams}; | ||
13 | |||
14 | use support::project; | ||
15 | |||
16 | #[test] | ||
17 | fn test_runnables() { | ||
18 | let server = project(r" | ||
19 | //- lib.rs | ||
20 | #[test] | ||
21 | fn foo() { | ||
22 | } | ||
23 | "); | ||
24 | server.request::<Runnables>( | ||
25 | RunnablesParams { | ||
26 | text_document: server.doc_id("lib.rs"), | ||
27 | position: None, | ||
28 | }, | ||
29 | r#"[ | ||
30 | { | ||
31 | "args": [ "test", "--", "foo", "--nocapture" ], | ||
32 | "bin": "cargo", | ||
33 | "env": { "RUST_BACKTRACE": "short" }, | ||
34 | "label": "test foo", | ||
35 | "range": { | ||
36 | "end": { "character": 1, "line": 2 }, | ||
37 | "start": { "character": 0, "line": 0 } | ||
38 | } | ||
39 | } | ||
40 | ]"# | ||
41 | ); | ||
42 | } | ||