summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/run_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-02 14:54:08 +0200
committerPaul Buetow <paul@buetow.org>2026-03-02 14:54:08 +0200
commitf80462176d1ad0daf20b05d6410074369148c245 (patch)
tree5cbe412797c923a881333bd89d59d238be646ad7 /internal/hexaiaction/run_test.go
parent5f8e008fc2e5a9abb8bc2c8cfe66ec49cce3a19d (diff)
hexaiaction: replace global action state with Runner struct (task 406)
Diffstat (limited to 'internal/hexaiaction/run_test.go')
-rw-r--r--internal/hexaiaction/run_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/hexaiaction/run_test.go b/internal/hexaiaction/run_test.go
index e28bceb..adc3159 100644
--- a/internal/hexaiaction/run_test.go
+++ b/internal/hexaiaction/run_test.go
@@ -19,7 +19,7 @@ func (f fakeDoer) DefaultModel() string { return "m" }
func TestExecuteAction_Skip(t *testing.T) {
cfg := appconfig.App{}
parts := InputParts{Selection: "data"}
- out, err := executeAction(context.Background(), ActionSkip, parts, cfg, fakeDoer{"IGN"}, nil)
+ out, err := executeAction(context.Background(), ActionSkip, parts, cfg, fakeDoer{"IGN"}, nil, nil)
if err != nil || out != "data" {
t.Fatalf("skip failed: %q %v", out, err)
}
@@ -32,19 +32,19 @@ func TestExecuteAction_Rewrite_Document_GoTest(t *testing.T) {
// rewrite with inline instruction
sel := ";change;\ncode"
- out, err := executeAction(context.Background(), ActionRewrite, InputParts{Selection: sel}, cfg, client, nil)
+ out, err := executeAction(context.Background(), ActionRewrite, InputParts{Selection: sel}, cfg, client, nil, nil)
if err != nil || strings.TrimSpace(out) != "DONE" {
t.Fatalf("rewrite failed: %q %v", out, err)
}
// document
- out, err = executeAction(context.Background(), ActionDocument, InputParts{Selection: "code"}, cfg, client, nil)
+ out, err = executeAction(context.Background(), ActionDocument, InputParts{Selection: "code"}, cfg, client, nil, nil)
if err != nil || strings.TrimSpace(out) != "DONE" {
t.Fatalf("document failed: %q %v", out, err)
}
// go test
- out, err = executeAction(context.Background(), ActionGoTest, InputParts{Selection: "func A(){}"}, cfg, client, nil)
+ out, err = executeAction(context.Background(), ActionGoTest, InputParts{Selection: "func A(){}"}, cfg, client, nil, nil)
if err != nil || strings.TrimSpace(out) != "DONE" {
t.Fatalf("gotest failed: %q %v", out, err)
}