MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / test_move_with_shift_creates_selection

Function test_move_with_shift_creates_selection

src/text_input.rs:3265–3277  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

move_rightMethod · 0.80

Tested by

no test coverage detected