diff options
Diffstat (limited to 'crates/ra_lsp_server/tests')
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/main.rs | 6 | ||||
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/support.rs | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs index 407719080..e9ce002de 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/main.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs | |||
@@ -62,6 +62,7 @@ fn foo() { | |||
62 | "args": [ "test", "--", "foo", "--nocapture" ], | 62 | "args": [ "test", "--", "foo", "--nocapture" ], |
63 | "bin": "cargo", | 63 | "bin": "cargo", |
64 | "env": { "RUST_BACKTRACE": "short" }, | 64 | "env": { "RUST_BACKTRACE": "short" }, |
65 | "cwd": null, | ||
65 | "label": "test foo", | 66 | "label": "test foo", |
66 | "range": { | 67 | "range": { |
67 | "end": { "character": 1, "line": 2 }, | 68 | "end": { "character": 1, "line": 2 }, |
@@ -75,6 +76,7 @@ fn foo() { | |||
75 | ], | 76 | ], |
76 | "bin": "cargo", | 77 | "bin": "cargo", |
77 | "env": {}, | 78 | "env": {}, |
79 | "cwd": null, | ||
78 | "label": "cargo check --all", | 80 | "label": "cargo check --all", |
79 | "range": { | 81 | "range": { |
80 | "end": { | 82 | "end": { |
@@ -123,7 +125,8 @@ fn test_eggs() {} | |||
123 | "range": { | 125 | "range": { |
124 | "end": { "character": 17, "line": 1 }, | 126 | "end": { "character": 17, "line": 1 }, |
125 | "start": { "character": 0, "line": 0 } | 127 | "start": { "character": 0, "line": 0 } |
126 | } | 128 | }, |
129 | "cwd": server.path() | ||
127 | }, | 130 | }, |
128 | { | 131 | { |
129 | "args": [ | 132 | "args": [ |
@@ -135,6 +138,7 @@ fn test_eggs() {} | |||
135 | ], | 138 | ], |
136 | "bin": "cargo", | 139 | "bin": "cargo", |
137 | "env": {}, | 140 | "env": {}, |
141 | "cwd": server.path(), | ||
138 | "label": "cargo check -p foo", | 142 | "label": "cargo check -p foo", |
139 | "range": { | 143 | "range": { |
140 | "end": { | 144 | "end": { |
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index 4ea6760a1..9e115fb7f 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use std::{ | 1 | use std::{ |
2 | cell::{Cell, RefCell}, | 2 | cell::{Cell, RefCell}, |
3 | fs, | 3 | fs, |
4 | path::PathBuf, | 4 | path::{Path, PathBuf}, |
5 | sync::Once, | 5 | sync::Once, |
6 | time::Duration, | 6 | time::Duration, |
7 | }; | 7 | }; |
@@ -177,6 +177,10 @@ impl Server { | |||
177 | fn send_notification(&self, not: RawNotification) { | 177 | fn send_notification(&self, not: RawNotification) { |
178 | self.worker.as_ref().unwrap().sender().send(RawMessage::Notification(not)).unwrap(); | 178 | self.worker.as_ref().unwrap().sender().send(RawMessage::Notification(not)).unwrap(); |
179 | } | 179 | } |
180 | |||
181 | pub fn path(&self) -> &Path { | ||
182 | self.dir.path() | ||
183 | } | ||
180 | } | 184 | } |
181 | 185 | ||
182 | impl Drop for Server { | 186 | impl Drop for Server { |