mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Assert the editor and unmarked texts are the same
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
f9c60b98c0
commit
b3b8f8532d
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue