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

Function test_diff_insert

atomic-core/src/diff/mod.rs:830–837  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

828
829 #[test]
830 fn test_diff_insert() {
831 let old = b"line1\nline3\n";
832 let new = b"line1\nline2\nline3\n";
833 let result = diff_text(old, new, Algorithm::Myers);
834 assert!(!result.is_unchanged());
835 assert_eq!(result.insertions(), 1);
836 assert_eq!(result.deletions(), 0);
837 }
838
839 #[test]
840 fn test_diff_delete() {

Callers

nothing calls this directly

Calls 1

diff_textFunction · 0.85

Tested by

no test coverage detected