Add failing test for multi-byte characters
This commit is contained in:
parent
070607c821
commit
b6ff07afac
1 changed files with 20 additions and 0 deletions
|
@ -8324,6 +8324,26 @@ mod tests {
|
|||
editor
|
||||
})
|
||||
.1;
|
||||
|
||||
cx.add_window(Default::default(), |cx| {
|
||||
let mut editor = build_editor(MultiBuffer::build_simple("🍐🏀✋", cx), cx);
|
||||
|
||||
editor.select_ranges([4..4], None, cx);
|
||||
editor.transpose(&Default::default(), cx);
|
||||
assert_eq!(editor.text(cx), "🏀🍐✋");
|
||||
assert_eq!(editor.selected_ranges(cx), [8..8]);
|
||||
|
||||
editor.transpose(&Default::default(), cx);
|
||||
assert_eq!(editor.text(cx), "🏀✋🍐");
|
||||
assert_eq!(editor.selected_ranges(cx), [11..11]);
|
||||
|
||||
editor.transpose(&Default::default(), cx);
|
||||
assert_eq!(editor.text(cx), "🏀🍐✋");
|
||||
assert_eq!(editor.selected_ranges(cx), [11..11]);
|
||||
|
||||
editor
|
||||
})
|
||||
.1;
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue