Skip to content
Myr

Close the temp ttyout file in the SGR deduplication test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The file is opened under t.TempDir() and never closed, so the cleanup that TempDir registers cannot remove it on Windows, where an open file cannot be unlinked. The test itself passes; it is the cleanup that fails the run. history_test.go and options_test.go already close theirs.

authored by Cyrus · committed by Junegunn Choi · parent ca4c1b8 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:src/tui/light_test.go+1 added
432 unmodified lines
433 out, err := os.CreateTemp(t.TempDir(), "fzf-ttyout")434 if err != nil {435 t.Fatal(err)436 }437 defer out.Close()438 r.ttyout = out439440 w := r.NewWindow(0, 0, 40, 4, WindowList, MakeBorderStyle(BorderNone, true), false).(*LightWindow)441 w.fg = colDefault
39 unmodified lines