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

Function test_no_styles_delete_forward

src/text_input.rs:3821–3830  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3819 #[test]
3820 #[cfg(feature = "text-styling")]
3821 fn test_no_styles_delete_forward() {
3822 let mut s = make_no_styles_state("{red|abc}");
3823 // Put cursor at content 1 (before 'b')
3824 s.cursor_pos = styling::content_to_cursor(&s.text, 1, true);
3825 s.delete_forward_styled();
3826 let stripped = styling::strip_styling(&s.text);
3827 assert_eq!(stripped, "ac");
3828 let cp = styling::cursor_to_content(&s.text, s.cursor_pos);
3829 assert_eq!(cp, 1);
3830 }
3831
3832 #[test]
3833 #[cfg(feature = "text-styling")]

Callers

nothing calls this directly

Calls 5

make_no_styles_stateFunction · 0.85
content_to_cursorFunction · 0.85
strip_stylingFunction · 0.85
cursor_to_contentFunction · 0.85
delete_forward_styledMethod · 0.80

Tested by

no test coverage detected