mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 14:43:55 +03:00
WIP: Edit one of the excerpted buffers and add an assertion
We'll need to detect edits on the child buffers and understand their impact on the tree.
This commit is contained in:
parent
811696670a
commit
0be897d5ac
@ -286,6 +286,35 @@ mod tests {
|
||||
"\n", //
|
||||
"jj" //
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
buffer_1.update(cx, |buffer, cx| {
|
||||
buffer.edit(
|
||||
[
|
||||
Point::new(0, 0)..Point::new(0, 0),
|
||||
Point::new(2, 1)..Point::new(2, 2),
|
||||
],
|
||||
"\n",
|
||||
cx,
|
||||
);
|
||||
});
|
||||
|
||||
assert_eq!(
|
||||
list.read(cx).text(),
|
||||
concat!(
|
||||
"\n", // Preserve newlines
|
||||
"\n", //
|
||||
"bbbb\n", //
|
||||
"c\n", //
|
||||
"ccc\n", //
|
||||
"\n", //
|
||||
"ddd\n", //
|
||||
"eeee\n", //
|
||||
"\n", //
|
||||
"\n", //
|
||||
"\n", //
|
||||
"jj" //
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user