mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
add test for text input unicode handling
This commit is contained in:
parent
26e6c09776
commit
49ea443146
1 changed files with 10 additions and 0 deletions
|
@ -496,3 +496,13 @@ fn test_textinput_set_selection_with_direction() {
|
|||
assert_eq!(textinput.selection_begin.unwrap().line, 0);
|
||||
assert_eq!(textinput.selection_begin.unwrap().index, 6);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_textinput_unicode_handling() {
|
||||
let mut textinput = text_input(Lines::Single, "éèùµ$£");
|
||||
assert_eq!(textinput.edit_point.index, 0);
|
||||
textinput.set_edit_point_index(1);
|
||||
assert_eq!(textinput.edit_point.index, 2);
|
||||
textinput.set_edit_point_index(4);
|
||||
assert_eq!(textinput.edit_point.index, 8);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue