Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Assert the editor and unmarked texts are the same
Petros Amoiridisb3b8f8532de2
diff --git a/crates/editor/src/test/editor_test_context.rs b/crates/editor/src/test/editor_test_context.rsindex ccd0e936a42..dfdcdad19b2 100644--- a/crates/editor/src/test/editor_test_context.rs+++ b/crates/editor/src/test/editor_test_context.rs@@ -187,8 +187,9 @@ impl<'a> EditorTestContext<'a> {"Initial Editor State: \"{}\"",marked_text.escape_debug().to_string()));- let (_, selection_ranges) = marked_text_ranges(marked_text, true);+ let (unmarked_text, selection_ranges) = marked_text_ranges(marked_text, true);self.editor.update(self.cx, |editor, cx| {+ assert_eq!(editor.text(cx), unmarked_text);editor.change_selections(Some(Autoscroll::fit()), cx, |s| {s.select_ranges(selection_ranges)})