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

Function test_roundtrip_visual_raw

src/text_input.rs:2952–2960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2950
2951 #[test]
2952 fn test_roundtrip_visual_raw() {
2953 let raw = r"hel\{lo{red|world}";
2954 // cursor_len = 12 (11 visible chars + 1 for })
2955 for v in 0..=12 {
2956 let r = cursor_to_raw(raw, v);
2957 let v2 = raw_to_cursor(raw, r);
2958 assert_eq!(v, v2, "visual {} → raw {} → visual {} (expected {})", v, r, v2, v);
2959 }
2960 }
2961
2962 #[test]
2963 fn test_cursor_to_raw_for_insertion_enters_empty_tag() {

Callers

nothing calls this directly

Calls 2

cursor_to_rawFunction · 0.85
raw_to_cursorFunction · 0.85

Tested by

no test coverage detected