@@ -1108,14 +1108,14 @@ mod tests {
lsp.receive_notification::<lsp::notification::DidCloseTextDocument>()
.await,
lsp::DidCloseTextDocumentParams {
- text_document: lsp::TextDocumentIdentifier::new(buffer_2_uri.clone()),
+ text_document: lsp::TextDocumentIdentifier::new(buffer_1_uri.clone()),
}
);
assert_eq!(
lsp.receive_notification::<lsp::notification::DidCloseTextDocument>()
.await,
lsp::DidCloseTextDocumentParams {
- text_document: lsp::TextDocumentIdentifier::new(buffer_1_uri.clone()),
+ text_document: lsp::TextDocumentIdentifier::new(buffer_2_uri.clone()),
}
);
@@ -1129,15 +1129,16 @@ mod tests {
.update(cx, |copilot, cx| copilot.sign_in(cx))
.await
.unwrap();
+
assert_eq!(
lsp.receive_notification::<lsp::notification::DidOpenTextDocument>()
.await,
lsp::DidOpenTextDocumentParams {
text_document: lsp::TextDocumentItem::new(
- buffer_2_uri.clone(),
+ buffer_1_uri.clone(),
"plaintext".into(),
0,
- "Goodbye".into()
+ "Hello world".into()
),
}
);
@@ -1146,14 +1147,13 @@ mod tests {
.await,
lsp::DidOpenTextDocumentParams {
text_document: lsp::TextDocumentItem::new(
- buffer_1_uri.clone(),
+ buffer_2_uri.clone(),
"plaintext".into(),
0,
- "Hello world".into()
+ "Goodbye".into()
),
}
);
-
// Dropping a buffer causes it to be closed on the LSP side as well.
cx.update(|_| drop(buffer_2));
assert_eq!(