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

Function test_cleanup_deeply_nested_nonempty

src/text_input.rs:2901–2910  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2899
2900 #[test]
2901 fn test_cleanup_deeply_nested_nonempty() {
2902 // Deeply nested non-empty tags shouldn't inflate visual counter
2903 let raw = "aaa{r|{g|{b|xyz}}}end";
2904 // Visual: a(1)a(2)a(3) x(4)y(5)z(6) }(7) }(8) }(9) e(10)n(11)d(12)
2905 let vl = cursor_len(raw);
2906 assert_eq!(vl, 12);
2907 let (result, new_cursor) = cleanup_empty_styles(raw, vl);
2908 assert_eq!(result, raw);
2909 assert_eq!(new_cursor, vl);
2910 }
2911
2912 #[test]
2913 fn test_word_boundary_visual_nested_tags() {

Callers

nothing calls this directly

Calls 2

cursor_lenFunction · 0.85
cleanup_empty_stylesFunction · 0.85

Tested by

no test coverage detected