aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libeditor/tests')
-rw-r--r--crates/libeditor/tests/test.rs22
1 files changed, 21 insertions, 1 deletions
diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs
index c8882c94d..9d59f4cdf 100644
--- a/crates/libeditor/tests/test.rs
+++ b/crates/libeditor/tests/test.rs
@@ -9,7 +9,7 @@ use libeditor::{
9 ActionResult, 9 ActionResult,
10 highlight, runnables, extend_selection, file_structure, 10 highlight, runnables, extend_selection, file_structure,
11 flip_comma, add_derive, add_impl, matching_brace, 11 flip_comma, add_derive, add_impl, matching_brace,
12 join_lines, 12 join_lines, scope_completion,
13}; 13};
14 14
15#[test] 15#[test]
@@ -244,6 +244,26 @@ struct Foo { f: u32 }
244"); 244");
245} 245}
246 246
247// #[test]
248// fn test_completion() {
249// fn do_check(code: &str, expected_completions: &str) {
250// let (off, code) = extract_offset(&code);
251// let file = file(&code);
252// let completions = scope_completion(&file, off).unwrap();
253// assert_eq_dbg(expected_completions, &completions);
254// }
255
256// do_check(r"
257// fn foo(foo: i32) {
258// let bar = 92;
259// 1 + <|>
260// }
261// ", r#"
262// CompletionItem { name: "bar" },
263// CompletionItem { name: "foo" },
264// "#);
265// }
266
247fn file(text: &str) -> File { 267fn file(text: &str) -> File {
248 File::parse(text) 268 File::parse(text)
249} 269}