aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/tests/heavy_tests/support.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/crates/rust-analyzer/tests/heavy_tests/support.rs b/crates/rust-analyzer/tests/heavy_tests/support.rs
index 001a2a104..8d88f992d 100644
--- a/crates/rust-analyzer/tests/heavy_tests/support.rs
+++ b/crates/rust-analyzer/tests/heavy_tests/support.rs
@@ -19,7 +19,7 @@ use test_utils::{find_mismatch, Fixture};
19 19
20use ra_project_model::ProjectManifest; 20use ra_project_model::ProjectManifest;
21use rust_analyzer::{ 21use rust_analyzer::{
22 config::{ClientCapsConfig, Config, LinkedProject}, 22 config::{ClientCapsConfig, Config, FilesConfig, FilesWatcher, LinkedProject},
23 main_loop, 23 main_loop,
24}; 24};
25 25
@@ -90,9 +90,9 @@ impl<'a> Project<'a> {
90 }, 90 },
91 with_sysroot: self.with_sysroot, 91 with_sysroot: self.with_sysroot,
92 linked_projects, 92 linked_projects,
93 files: FilesConfig { watcher: FilesWatcher::Client, exclude: Vec::new() },
93 ..Config::default() 94 ..Config::default()
94 }; 95 };
95
96 if let Some(f) = &self.config { 96 if let Some(f) = &self.config {
97 f(&mut config) 97 f(&mut config)
98 } 98 }
@@ -173,8 +173,14 @@ impl Server {
173 self.client.sender.send(r.into()).unwrap(); 173 self.client.sender.send(r.into()).unwrap();
174 while let Some(msg) = self.recv() { 174 while let Some(msg) = self.recv() {
175 match msg { 175 match msg {
176 Message::Request(req) if req.method == "window/workDoneProgress/create" => (), 176 Message::Request(req) => {
177 Message::Request(req) => panic!("unexpected request: {:?}", req), 177 if req.method != "window/workDoneProgress/create"
178 && !(req.method == "client/registerCapability"
179 && req.params.to_string().contains("workspace/didChangeWatchedFiles"))
180 {
181 panic!("unexpected request: {:?}", req)
182 }
183 }
178 Message::Notification(_) => (), 184 Message::Notification(_) => (),
179 Message::Response(res) => { 185 Message::Response(res) => {
180 assert_eq!(res.id, id); 186 assert_eq!(res.id, id);