MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_parse_hunks_simple

Function test_parse_hunks_simple

core/src/tools/builtin/patch.rs:316–323  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314
315 #[test]
316 fn test_parse_hunks_simple() {
317 let diff = "@@ -1,3 +1,3 @@\n line1\n-old_line\n+new_line\n line3";
318 let hunks = parse_hunks(diff).unwrap();
319 assert_eq!(hunks.len(), 1);
320 assert_eq!(hunks[0].old_start, 1);
321 assert_eq!(hunks[0].removals, vec!["old_line"]);
322 assert_eq!(hunks[0].additions, vec!["new_line"]);
323 }
324
325 #[test]
326 fn test_apply_hunks_simple() {

Callers

nothing calls this directly

Calls 1

parse_hunksFunction · 0.85

Tested by

no test coverage detected