@@ -14,13 +14,15 @@ import (
14
14
"time"
15
15
)
16
16
17
- func newChildProcess (t * testing.T ) (* Nvim , func ()) {
17
+ func newChildProcess (tb testing.TB ) (* Nvim , func ()) {
18
+ tb .Helper ()
19
+
18
20
v , err := NewChildProcess (
19
21
ChildProcessArgs ("-u" , "NONE" , "-n" , "--embed" , "--headless" ),
20
22
ChildProcessEnv ([]string {}),
21
- ChildProcessLogf (t .Logf ))
23
+ ChildProcessLogf (tb .Logf ))
22
24
if err != nil {
23
- t .Fatal (err )
25
+ tb .Fatal (err )
24
26
}
25
27
26
28
done := make (chan error , 1 )
@@ -30,7 +32,7 @@ func newChildProcess(t *testing.T) (*Nvim, func()) {
30
32
31
33
return v , func () {
32
34
if err := v .Close (); err != nil {
33
- t .Fatal (err )
35
+ tb .Fatal (err )
34
36
}
35
37
}
36
38
}
@@ -754,9 +756,11 @@ func testRuntimeFiles(t *testing.T, v *Nvim) func(*testing.T) {
754
756
}
755
757
756
758
// clearBuffer clears the buffer text.
757
- func clearBuffer (t * testing.T , v * Nvim , buffer Buffer ) {
759
+ func clearBuffer (tb testing.TB , v * Nvim , buffer Buffer ) {
760
+ tb .Helper ()
761
+
758
762
if err := v .SetBufferLines (buffer , 0 , - 1 , true , bytes .Fields (nil )); err != nil {
759
- t .Fatal (err )
763
+ tb .Fatal (err )
760
764
}
761
765
}
762
766
0 commit comments