MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_inline_diff_render_html

Function test_inline_diff_render_html

atomic-core/src/diff/inline.rs:1093–1104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1091
1092 #[test]
1093 fn test_inline_diff_render_html() {
1094 let diff = compute_inline_diff(b"old", b"new");
1095
1096 let old_html = diff.render_old_html();
1097 let new_html = diff.render_new_html();
1098
1099 // Should contain span tags for changes
1100 if diff.has_changes() {
1101 assert!(old_html.contains("<span") || !old_html.contains("old"));
1102 assert!(new_html.contains("<span") || !new_html.contains("new"));
1103 }
1104 }
1105
1106 #[test]
1107 fn test_html_escape() {

Callers

nothing calls this directly

Calls 4

compute_inline_diffFunction · 0.85
render_old_htmlMethod · 0.80
render_new_htmlMethod · 0.80
has_changesMethod · 0.45

Tested by

no test coverage detected