Skip to content

Commit

Permalink
nvim: cleanup .nvimlog file in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
zchee committed Nov 7, 2020
1 parent 60804fc commit 5f6d7e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nvim/nvim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"log"
"os"
"path/filepath"
"reflect"
"sort"
Expand Down Expand Up @@ -34,6 +35,12 @@ func newChildProcess(tb testing.TB) (*Nvim, func()) {
if err := v.Close(); err != nil {
tb.Fatal(err)
}

if _, err := os.Stat(".nvimlog"); err == nil {
tb.Cleanup(func() {
os.RemoveAll(".nvimlog")
})
}
}
}

Expand Down

0 comments on commit 5f6d7e3

Please sign in to comment.