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

Function test_insert_text_max_length

src/text_input.rs:3198–3207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3196
3197 #[test]
3198 fn test_insert_text_max_length() {
3199 let mut state = TextEditState::default();
3200 state.insert_text("Hello World", Some(5));
3201 assert_eq!(state.text, "Hello");
3202 assert_eq!(state.cursor_pos, 5);
3203
3204 // Already at max, no more insertion
3205 state.insert_text("!", Some(5));
3206 assert_eq!(state.text, "Hello");
3207 }
3208
3209 #[test]
3210 fn test_backspace() {

Callers

nothing calls this directly

Calls 1

insert_textMethod · 0.80

Tested by

no test coverage detected