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

Function test_change_hunk_try_extract

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

Source from the content-addressed store, hash-verified

975
976 #[test]
977 fn test_change_hunk_try_extract() {
978 let content = b"hello";
979 let valid = ChangeHunk::new(0, 3, HunkKind::Deleted);
980 assert_eq!(valid.try_extract(content), Some(&b"hel"[..]));
981
982 let invalid = ChangeHunk::new(0, 100, HunkKind::Deleted);
983 assert_eq!(invalid.try_extract(content), None);
984 }
985
986 #[test]
987 fn test_change_hunk_display() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected