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

Function test_diff_delete

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

Source from the content-addressed store, hash-verified

777
778 #[test]
779 fn test_diff_delete() {
780 let old = b"line1\nline2\nline3\n";
781 let new = b"line1\nline3\n";
782 let result = diff_text(old, new, Algorithm::Myers);
783 assert!(!result.is_unchanged());
784 assert_eq!(result.deletions(), 1);
785 assert_eq!(result.insertions(), 0);
786 }
787
788 #[test]
789 fn test_diff_replace() {

Callers

nothing calls this directly

Calls 1

diff_textFunction · 0.85

Tested by

no test coverage detected