diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-25 08:49:02 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-25 08:49:02 +0300 |
| commit | e33cd60277bc717ad7a8c73cf01c7bedad0d1837 (patch) | |
| tree | cf3e72b6e16223a207883c7049ae200ac57aee2d /internal/hexaiaction/cmdentry_test.go | |
| parent | caa7876ac8bdb5cc23e12db4d4cb65cf86861151 (diff) | |
Release v0.35.0: fix-typos action and tmux popup for hexai-tmux-actionv0.35.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/hexaiaction/cmdentry_test.go')
| -rw-r--r-- | internal/hexaiaction/cmdentry_test.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/internal/hexaiaction/cmdentry_test.go b/internal/hexaiaction/cmdentry_test.go index 054c78c..b9d5e9b 100644 --- a/internal/hexaiaction/cmdentry_test.go +++ b/internal/hexaiaction/cmdentry_test.go @@ -78,9 +78,9 @@ func TestRunInTmuxParent_Stubbed(t *testing.T) { // capture stdout rout, wout, _ := os.Pipe() oldExec := osExecutableFn - oldSplit := splitRunFn + oldPopup := popupRunFn osExecutableFn = func() (string, error) { return "/bin/hexai-tmux-action", nil } - splitRunFn = func(opts tmux.SplitOpts, argv []string) error { + popupRunFn = func(opts tmux.PopupOpts, argv []string) error { for i := 0; i < len(argv)-1; i++ { if argv[i] == "-outfile" && i+1 < len(argv) { _ = os.WriteFile(argv[i+1], []byte("OUT:"+strings.Join(argv, ",")), 0o600) @@ -89,8 +89,8 @@ func TestRunInTmuxParent_Stubbed(t *testing.T) { } return nil } - t.Cleanup(func() { osExecutableFn = oldExec; splitRunFn = oldSplit }) - if err := runInTmuxParent(context.Background(), r, wout, "", "v", 33); err != nil { + t.Cleanup(func() { osExecutableFn = oldExec; popupRunFn = oldPopup }) + if err := runInTmuxParent(context.Background(), r, wout, "", "", ""); err != nil { t.Fatalf("runInTmuxParent: %v", err) } _ = wout.Close() @@ -108,22 +108,22 @@ func TestRunInTmuxParent_ExecutableError(t *testing.T) { r, w, _ := os.Pipe() _, _ = w.Write([]byte("x")) _ = w.Close() - if err := runInTmuxParent(context.Background(), r, io.Discard, "", "v", 33); err == nil { + if err := runInTmuxParent(context.Background(), r, io.Discard, "", "", ""); err == nil { t.Fatal("expected error from missing executable") } } -func TestRunInTmuxParent_SplitError(t *testing.T) { +func TestRunInTmuxParent_PopupError(t *testing.T) { oldExec := osExecutableFn osExecutableFn = func() (string, error) { return "/bin/hexai-tmux-action", nil } - oldSplit := splitRunFn - splitRunFn = func(_ tmux.SplitOpts, _ []string) error { return fmt.Errorf("split failed") } - t.Cleanup(func() { osExecutableFn = oldExec; splitRunFn = oldSplit }) + oldPopup := popupRunFn + popupRunFn = func(_ tmux.PopupOpts, _ []string) error { return fmt.Errorf("popup failed") } + t.Cleanup(func() { osExecutableFn = oldExec; popupRunFn = oldPopup }) r, w, _ := os.Pipe() _, _ = w.Write([]byte("x")) _ = w.Close() - if err := runInTmuxParent(context.Background(), r, io.Discard, "", "v", 33); err == nil { - t.Fatal("expected split error") + if err := runInTmuxParent(context.Background(), r, io.Discard, "", "", ""); err == nil { + t.Fatal("expected popup error") } } |
