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

Function test_change_hunk_extract

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

Source from the content-addressed store, hash-verified

965
966 #[test]
967 fn test_change_hunk_extract() {
968 let content = b"hello world";
969 let hunk = ChangeHunk::new(0, 5, HunkKind::Deleted);
970 assert_eq!(hunk.extract(content), b"hello");
971
972 let hunk2 = ChangeHunk::new(6, 11, HunkKind::Inserted);
973 assert_eq!(hunk2.extract(content), b"world");
974 }
975
976 #[test]
977 fn test_change_hunk_try_extract() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected