()
| 3263 | |
| 3264 | #[test] |
| 3265 | fn test_move_with_shift_creates_selection() { |
| 3266 | let mut state = TextEditState::default(); |
| 3267 | state.text = "Hello".to_string(); |
| 3268 | state.cursor_pos = 2; |
| 3269 | |
| 3270 | state.move_right(true); |
| 3271 | assert_eq!(state.cursor_pos, 3); |
| 3272 | assert_eq!(state.selection_anchor, Some(2)); |
| 3273 | |
| 3274 | state.move_right(true); |
| 3275 | assert_eq!(state.cursor_pos, 4); |
| 3276 | assert_eq!(state.selection_anchor, Some(2)); |
| 3277 | } |
| 3278 | |
| 3279 | #[test] |
| 3280 | fn test_display_text_normal() { |
nothing calls this directly
no test coverage detected