()
| 3804 | #[test] |
| 3805 | #[cfg(feature = "text-styling")] |
| 3806 | fn test_no_styles_backspace() { |
| 3807 | let mut s = make_no_styles_state("a{red|b}c"); |
| 3808 | // Put cursor at content 2 (before 'c') |
| 3809 | s.cursor_pos = styling::content_to_cursor(&s.text, 2, true); |
| 3810 | s.backspace_styled(); |
| 3811 | // Should delete 'b', leaving "a...c" |
| 3812 | let stripped = styling::strip_styling(&s.text); |
| 3813 | assert_eq!(stripped, "ac"); |
| 3814 | // Cursor should be at content 1 (between a and c) |
| 3815 | let cp = styling::cursor_to_content(&s.text, s.cursor_pos); |
| 3816 | assert_eq!(cp, 1); |
| 3817 | } |
| 3818 | |
| 3819 | #[test] |
| 3820 | #[cfg(feature = "text-styling")] |
nothing calls this directly
no test coverage detected