Skip to content

Commit 8dae6c2

Browse files
committed
nvim: add ProcChildren testcase
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 2015f01 commit 8dae6c2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

nvim/api_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4787,6 +4787,14 @@ func testProc(v *Nvim) func(*testing.T) {
47874787
t.Fatalf("got %d Process.PPID but want %d", gotProc.PPID, wantProcess.PPID)
47884788
}
47894789
})
4790+
4791+
t.Run("ProcChildren", func(t *testing.T) {
4792+
_, err := v.ProcChildren(os.Getpid())
4793+
if err != nil {
4794+
t.Fatal(err)
4795+
}
4796+
// TODO(zchee): assert processes
4797+
})
47904798
})
47914799

47924800
t.Run("Batch", func(t *testing.T) {
@@ -4823,6 +4831,17 @@ func testProc(v *Nvim) func(*testing.T) {
48234831
t.Fatalf("got %d Process.PPID but want %d", gotProc.PPID, wantProcess.PPID)
48244832
}
48254833
})
4834+
4835+
t.Run("ProcChildren", func(t *testing.T) {
4836+
b := v.NewBatch()
4837+
4838+
var processes []uint
4839+
b.ProcChildren(os.Getpid(), &processes)
4840+
if err := b.Execute(); err != nil {
4841+
t.Fatal(err)
4842+
}
4843+
// TODO(zchee): assert processes
4844+
})
48264845
})
48274846
}
48284847
}

0 commit comments

Comments
 (0)