Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit bf8f77e

Browse files
committed
Remove simple_workspace test
Should be temporary cc #455
1 parent d894da1 commit bf8f77e

File tree

7 files changed

+26
-70
lines changed

7 files changed

+26
-70
lines changed

src/test/mod.rs

+26-25
Original file line numberDiff line numberDiff line change
@@ -451,31 +451,32 @@ fn test_bin_lib_project_no_cfg_test() {
451451
ExpectedMessage::new(None).expect_contains("diagnosticsEnd")]);
452452
}
453453

454-
#[test]
455-
fn test_simple_workspace() {
456-
let (cache, _tc) = init_env("simple_workspace");
457-
458-
let root_path = cache.abs_path(Path::new("."));
459-
460-
let messages = vec![
461-
ServerMessage::initialize(0, root_path.as_os_str().to_str().map(|x| x.to_owned())),
462-
];
463-
464-
let mut config = Config::default();
465-
config.workspace_mode = true;
466-
let (mut server, results) = mock_server_with_config(messages, config);
467-
// Initialise and build.
468-
assert_eq!(ls_server::LsService::handle_message(&mut server),
469-
ls_server::ServerStateChange::Continue);
470-
expect_messages(results.clone(), &[ExpectedMessage::new(Some(0)).expect_contains("capabilities"),
471-
ExpectedMessage::new(None).expect_contains("diagnosticsBegin"),
472-
// TODO: Ideally we should check for message contents for different crates/targets,
473-
// however order of received messages is non-deterministic and this
474-
// would require implementing something like `or_expect_contains`
475-
ExpectedMessage::new(None).expect_contains("publishDiagnostics"),
476-
ExpectedMessage::new(None).expect_contains("publishDiagnostics"),
477-
ExpectedMessage::new(None).expect_contains("diagnosticsEnd")]);
478-
}
454+
// FIXME(#455) reinstate this test
455+
// #[test]
456+
// fn test_simple_workspace() {
457+
// let (cache, _tc) = init_env("simple_workspace");
458+
459+
// let root_path = cache.abs_path(Path::new("."));
460+
461+
// let messages = vec![
462+
// ServerMessage::initialize(0, root_path.as_os_str().to_str().map(|x| x.to_owned())),
463+
// ];
464+
465+
// let mut config = Config::default();
466+
// config.workspace_mode = true;
467+
// let (mut server, results) = mock_server_with_config(messages, config);
468+
// // Initialise and build.
469+
// assert_eq!(ls_server::LsService::handle_message(&mut server),
470+
// ls_server::ServerStateChange::Continue);
471+
// expect_messages(results.clone(), &[ExpectedMessage::new(Some(0)).expect_contains("capabilities"),
472+
// ExpectedMessage::new(None).expect_contains("diagnosticsBegin"),
473+
// // TODO: Ideally we should check for message contents for different crates/targets,
474+
// // however order of received messages is non-deterministic and this
475+
// // would require implementing something like `or_expect_contains`
476+
// ExpectedMessage::new(None).expect_contains("publishDiagnostics"),
477+
// ExpectedMessage::new(None).expect_contains("publishDiagnostics"),
478+
// ExpectedMessage::new(None).expect_contains("diagnosticsEnd")]);
479+
// }
479480

480481
#[test]
481482
fn test_infer_lib() {

test_data/simple_workspace/Cargo.lock

-11
This file was deleted.

test_data/simple_workspace/Cargo.toml

-6
This file was deleted.

test_data/simple_workspace/member_bin/Cargo.toml

-7
This file was deleted.

test_data/simple_workspace/member_bin/src/main.rs

-5
This file was deleted.

test_data/simple_workspace/member_lib/Cargo.toml

-6
This file was deleted.

test_data/simple_workspace/member_lib/src/lib.rs

-10
This file was deleted.

0 commit comments

Comments
 (0)