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

Function test_move_left_right

src/text_input.rs:3252–3262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3250
3251 #[test]
3252 fn test_move_left_right() {
3253 let mut state = TextEditState::default();
3254 state.text = "AB".to_string();
3255 state.cursor_pos = 1;
3256
3257 state.move_left(false);
3258 assert_eq!(state.cursor_pos, 0);
3259
3260 state.move_right(false);
3261 assert_eq!(state.cursor_pos, 1);
3262 }
3263
3264 #[test]
3265 fn test_move_with_shift_creates_selection() {

Callers

nothing calls this directly

Calls 2

move_leftMethod · 0.80
move_rightMethod · 0.80

Tested by

no test coverage detected