Skip to content

Commit 7009e5a

Browse files
committed
add failing test
1 parent 1182387 commit 7009e5a

File tree

1 file changed

+39
-1
lines changed
  • crates/rust-analyzer/tests/slow-tests

1 file changed

+39
-1
lines changed

crates/rust-analyzer/tests/slow-tests/main.rs

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use lsp_types::{
2020
notification::DidOpenTextDocument,
2121
request::{
2222
CodeActionRequest, Completion, Formatting, GotoTypeDefinition, HoverRequest,
23-
WillRenameFiles,
23+
WillRenameFiles, WorkspaceSymbol,
2424
},
2525
CodeActionContext, CodeActionParams, CompletionParams, DidOpenTextDocumentParams,
2626
DocumentFormattingParams, FileRename, FormattingOptions, GotoDefinitionParams, HoverParams,
@@ -1056,3 +1056,41 @@ fn main() {}
10561056
}),
10571057
);
10581058
}
1059+
1060+
#[test]
1061+
fn test_exclude_config_works() {
1062+
if skip_slow_tests() {
1063+
return;
1064+
}
1065+
1066+
let server = Project::with_fixture(
1067+
r#"
1068+
//- /foo/Cargo.toml
1069+
[package]
1070+
name = "foo"
1071+
version = "0.0.0"
1072+
1073+
//- /foo/src/lib.rs
1074+
pub fn foo() {}
1075+
1076+
//- /bar/Cargo.toml
1077+
[package]
1078+
name = "bar"
1079+
version = "0.0.0"
1080+
1081+
//- /bar/src/lib.rs
1082+
pub fn bar() {}
1083+
"#,
1084+
)
1085+
.root("foo")
1086+
.root("bar")
1087+
.with_config(json!({
1088+
"files": {
1089+
"excludeDirs": ["foo", "bar"]
1090+
}
1091+
}))
1092+
.server()
1093+
.wait_until_workspace_is_loaded();
1094+
1095+
server.request::<WorkspaceSymbol>(Default::default(), json!([]));
1096+
}

0 commit comments

Comments
 (0)