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

Function test_selection_delete

src/text_input.rs:3230–3239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3228
3229 #[test]
3230 fn test_selection_delete() {
3231 let mut state = TextEditState::default();
3232 state.text = "Hello World".to_string();
3233 state.selection_anchor = Some(0);
3234 state.cursor_pos = 5;
3235 state.delete_selection();
3236 assert_eq!(state.text, " World");
3237 assert_eq!(state.cursor_pos, 0);
3238 assert!(state.selection_anchor.is_none());
3239 }
3240
3241 #[test]
3242 fn test_select_all() {

Callers

nothing calls this directly

Calls 1

delete_selectionMethod · 0.80

Tested by

no test coverage detected