mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Remove rust-analyzer smoke test
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
aee479d615
commit
af0ce62d3b
2 changed files with 1 additions and 69 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
@ -34,11 +34,6 @@ jobs:
|
|||
with:
|
||||
clean: false
|
||||
|
||||
- name: Download rust-analyzer
|
||||
run: |
|
||||
script/download-rust-analyzer
|
||||
echo "$PWD/vendor/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --workspace --no-fail-fast
|
||||
|
||||
|
@ -69,14 +64,11 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
with:
|
||||
clean: false
|
||||
|
||||
|
||||
- name: Validate version
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
run: script/validate-version
|
||||
|
||||
- name: Download rust-analyzer
|
||||
run: script/download-rust-analyzer
|
||||
|
||||
- name: Create app bundle
|
||||
run: script/bundle
|
||||
|
||||
|
|
|
@ -700,8 +700,6 @@ impl FakeLanguageServer {
|
|||
mod tests {
|
||||
use super::*;
|
||||
use gpui::TestAppContext;
|
||||
use unindent::Unindent;
|
||||
use util::test::temp_tree;
|
||||
|
||||
#[ctor::ctor]
|
||||
fn init_logger() {
|
||||
|
@ -710,64 +708,6 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_rust_analyzer(cx: TestAppContext) {
|
||||
let lib_source = r#"
|
||||
fn fun() {
|
||||
let hello = "world";
|
||||
}
|
||||
"#
|
||||
.unindent();
|
||||
let root_dir = temp_tree(json!({
|
||||
"Cargo.toml": r#"
|
||||
[package]
|
||||
name = "temp"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
"#.unindent(),
|
||||
"src": {
|
||||
"lib.rs": &lib_source
|
||||
}
|
||||
}));
|
||||
let lib_file_uri = Url::from_file_path(root_dir.path().join("src/lib.rs")).unwrap();
|
||||
|
||||
let server =
|
||||
LanguageServer::new(Path::new("rust-analyzer"), root_dir.path(), cx.background())
|
||||
.unwrap();
|
||||
server.next_idle_notification().await;
|
||||
|
||||
server
|
||||
.notify::<notification::DidOpenTextDocument>(DidOpenTextDocumentParams {
|
||||
text_document: TextDocumentItem::new(
|
||||
lib_file_uri.clone(),
|
||||
"rust".to_string(),
|
||||
0,
|
||||
lib_source,
|
||||
),
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let hover = server
|
||||
.request::<request::HoverRequest>(HoverParams {
|
||||
text_document_position_params: TextDocumentPositionParams {
|
||||
text_document: TextDocumentIdentifier::new(lib_file_uri),
|
||||
position: Position::new(1, 21),
|
||||
},
|
||||
work_done_progress_params: Default::default(),
|
||||
})
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
hover.contents,
|
||||
HoverContents::Markup(MarkupContent {
|
||||
kind: MarkupKind::PlainText,
|
||||
value: "&str".to_string()
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_fake(cx: TestAppContext) {
|
||||
let (server, mut fake) = LanguageServer::fake(cx.background());
|
||||
|
|
Loading…
Reference in a new issue