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

Function test_insert_text

src/text_input.rs:3185–3195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3183
3184 #[test]
3185 fn test_insert_text() {
3186 let mut state = TextEditState::default();
3187 state.insert_text("Hello", None);
3188 assert_eq!(state.text, "Hello");
3189 assert_eq!(state.cursor_pos, 5);
3190
3191 state.cursor_pos = 5;
3192 state.insert_text(" World", None);
3193 assert_eq!(state.text, "Hello World");
3194 assert_eq!(state.cursor_pos, 11);
3195 }
3196
3197 #[test]
3198 fn test_insert_text_max_length() {

Callers

nothing calls this directly

Calls 1

insert_textMethod · 0.80

Tested by

no test coverage detected