Skip to content

Commit 7b55653

Browse files
committed
nvim: add TabpageWindows testcase
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent abb72cc commit 7b55653

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

nvim/api_test.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,6 +1453,18 @@ func testTabpage(v *Nvim) func(*testing.T) {
14531453
if err := v.SetCurrentTabpage(page); err != nil {
14541454
t.Fatal(err)
14551455
}
1456+
1457+
t.Run("TabpageWindows", func(t *testing.T) {
1458+
gotWins, err := v.TabpageWindows(Tabpage(0))
1459+
if err != nil {
1460+
t.Fatal(err)
1461+
}
1462+
1463+
wantWins := []Window{Window(1000)}
1464+
if !reflect.DeepEqual(gotWins, wantWins) {
1465+
t.Fatalf("expected %v but got %v", wantWins, gotWins)
1466+
}
1467+
})
14561468
})
14571469

14581470
t.Run("Batch", func(t *testing.T) {
@@ -1488,6 +1500,21 @@ func testTabpage(v *Nvim) func(*testing.T) {
14881500
if err := b.Execute(); err != nil {
14891501
t.Fatal(err)
14901502
}
1503+
1504+
t.Run("TabpageWindows", func(t *testing.T) {
1505+
b := v.NewBatch()
1506+
1507+
var gotWins []Window
1508+
b.TabpageWindows(Tabpage(0), &gotWins)
1509+
if err := b.Execute(); err != nil {
1510+
t.Fatal(err)
1511+
}
1512+
1513+
wantWins := []Window{Window(1000)}
1514+
if !reflect.DeepEqual(gotWins, wantWins) {
1515+
t.Fatalf("expected %v but got %v", wantWins, gotWins)
1516+
}
1517+
})
14911518
})
14921519
}
14931520
}

0 commit comments

Comments
 (0)