From e0370aafcc5df79c5345b48af79537d254cf16ac Mon Sep 17 00:00:00 2001 From: afjcjsbx Date: Tue, 12 May 2026 23:23:26 +0200 Subject: [PATCH] fix test --- pkg/tools/fs/edit_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/tools/fs/edit_test.go b/pkg/tools/fs/edit_test.go index e94a896da..b04c41fff 100644 --- a/pkg/tools/fs/edit_test.go +++ b/pkg/tools/fs/edit_test.go @@ -41,8 +41,11 @@ func TestEditTool_EditFile_Success(t *testing.T) { t.Fatal("Expected ForUser to contain the diff preview") } - if result.ForLLM != result.ForUser { - t.Errorf("Expected ForLLM and ForUser to match, got ForLLM=%q ForUser=%q", result.ForLLM, result.ForUser) + if result.ForLLM == result.ForUser { + t.Fatalf("Expected ForLLM to be a compact summary, got identical outputs %q", result.ForLLM) + } + if result.ForLLM != fmt.Sprintf("File edited: %s", testFile) { + t.Fatalf("Expected compact ForLLM summary, got %q", result.ForLLM) } diffPath := strings.TrimLeft(filepath.ToSlash(testFile), "/") @@ -431,7 +434,7 @@ func TestEditFileTool_Restricted_InPlaceEdit(t *testing.T) { result := tool.Execute(ctx, args) assert.False(t, result.IsError, "Expected success, got: %s", result.ForLLM) assert.False(t, result.Silent) - assert.Equal(t, result.ForLLM, result.ForUser) + assert.Equal(t, "File edited: edit_target.txt", result.ForLLM) assert.Contains(t, result.ForUser, "```diff") assert.Contains(t, result.ForUser, "--- a/edit_target.txt") assert.Contains(t, result.ForUser, "+++ b/edit_target.txt")