Assert the editor and unmarked texts are the same

Petros Amoiridis and Max Brunsfeld created

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Change summary

crates/editor/src/test/editor_test_context.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Detailed changes

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)
             })