From a450142aca947b9364e498897f522f854f19781d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 26 Aug 2018 09:12:18 +0300 Subject: fix stray curly --- crates/libeditor/tests/test.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'crates/libeditor/tests/test.rs') 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::{ ActionResult, highlight, runnables, extend_selection, file_structure, flip_comma, add_derive, add_impl, matching_brace, - join_lines, + join_lines, scope_completion, }; #[test] @@ -244,6 +244,26 @@ struct Foo { f: u32 } "); } +// #[test] +// fn test_completion() { +// fn do_check(code: &str, expected_completions: &str) { +// let (off, code) = extract_offset(&code); +// let file = file(&code); +// let completions = scope_completion(&file, off).unwrap(); +// assert_eq_dbg(expected_completions, &completions); +// } + +// do_check(r" +// fn foo(foo: i32) { +// let bar = 92; +// 1 + <|> +// } +// ", r#" +// CompletionItem { name: "bar" }, +// CompletionItem { name: "foo" }, +// "#); +// } + fn file(text: &str) -> File { File::parse(text) } -- cgit v1.2.3