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

Function test_apply_hunks_simple

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

Source from the content-addressed store, hash-verified

324
325 #[test]
326 fn test_apply_hunks_simple() {
327 let content = "line1\nold_line\nline3";
328 let diff = "@@ -1,3 +1,3 @@\n line1\n-old_line\n+new_line\n line3";
329 let hunks = parse_hunks(diff).unwrap();
330 let result = apply_hunks(content, &hunks).unwrap();
331 assert_eq!(result, "line1\nnew_line\nline3");
332 }
333
334 #[tokio::test]
335 async fn test_patch_tool() {

Callers

nothing calls this directly

Calls 2

parse_hunksFunction · 0.85
apply_hunksFunction · 0.85

Tested by

no test coverage detected