mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-28 08:55:27 +08:00
Fix a flacky bracket test (#64321)
Fixes a flack from https://github.com/zed-industries/zed/actions/runs/35127308706/job/104899555087?pr=64257#step:7:5674 I believe more tests are worth fixing like that, but those pass right now, so let's first deal with the only flaky one. Release Notes: - N/A
This commit is contained in:
1 parent
8eebe1ce1c
commit
cd78c2db42
1 file changed
+7
-2
@@ -1758,7 +1758,9 @@ fn test_bracket_ranges_keep_chunk_spanning_pairs_amid_errors(cx: &mut App) {
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn test_bracket_ranges_keep_pairs_straddling_a_chunk_boundary_amid_errors(cx: &mut App) {
|
||||
async fn test_bracket_ranges_keep_pairs_straddling_a_chunk_boundary_amid_errors(
|
||||
cx: &mut TestAppContext,
|
||||
) {
|
||||
let mut text = String::from("void outer(void) {\n");
|
||||
for index in 0..56 {
|
||||
text.push_str(&format!(" int before_{index:02} = 0;\n"));
|
||||
@@ -1782,7 +1784,10 @@ fn test_bracket_ranges_keep_pairs_straddling_a_chunk_boundary_amid_errors(cx: &m
|
||||
text.push_str(" }\n}\n");
|
||||
|
||||
let buffer = cx.new(|cx| Buffer::local(text.clone(), cx).with_language(c_lang(), cx));
|
||||
let snapshot = buffer.read(cx).snapshot();
|
||||
buffer
|
||||
.read_with(cx, |buffer, _| buffer.parsing_idle())
|
||||
.await;
|
||||
let snapshot = buffer.read_with(cx, |buffer, _| buffer.snapshot());
|
||||
assert_has_syntax_errors(&snapshot);
|
||||
|
||||
let open_row = snapshot.offset_to_point(if_open_offset).row;
|
||||
|
||||
Reference in new issue
Block a user