@@ -1477,6 +1477,29 @@ func testTabpage(v *Nvim) func(*testing.T) {
1477
1477
t .Fatalf ("expected %v but got %v" , wantWins , gotWins )
1478
1478
}
1479
1479
})
1480
+
1481
+ t .Run ("TabpageNumber" , func (t * testing.T ) {
1482
+ gotTabpageNum , err := v .TabpageNumber (Tabpage (0 ))
1483
+ if err != nil {
1484
+ t .Fatal (err )
1485
+ }
1486
+
1487
+ wantTabpageNum := 1
1488
+ if gotTabpageNum != wantTabpageNum {
1489
+ t .Fatalf ("expected %v but got %v" , wantTabpageNum , gotTabpageNum )
1490
+ }
1491
+ })
1492
+
1493
+ t .Run ("IsTabpageValid" , func (t * testing.T ) {
1494
+ valid , err := v .IsTabpageValid (Tabpage (0 ))
1495
+ if err != nil {
1496
+ t .Fatal (err )
1497
+ }
1498
+
1499
+ if ! valid {
1500
+ t .Fatalf ("expected valid but got %t" , valid )
1501
+ }
1502
+ })
1480
1503
})
1481
1504
1482
1505
t .Run ("Batch" , func (t * testing.T ) {
@@ -1542,6 +1565,35 @@ func testTabpage(v *Nvim) func(*testing.T) {
1542
1565
t .Fatalf ("expected %v but got %v" , wantWins , gotWins )
1543
1566
}
1544
1567
})
1568
+
1569
+ t .Run ("TabpageNumber" , func (t * testing.T ) {
1570
+ b := v .NewBatch ()
1571
+
1572
+ var gotTabpageNum int
1573
+ b .TabpageNumber (Tabpage (0 ), & gotTabpageNum )
1574
+ if err := b .Execute (); err != nil {
1575
+ t .Fatal (err )
1576
+ }
1577
+
1578
+ wantTabpageNum := 1
1579
+ if gotTabpageNum != wantTabpageNum {
1580
+ t .Fatalf ("expected %v but got %v" , wantTabpageNum , gotTabpageNum )
1581
+ }
1582
+ })
1583
+
1584
+ t .Run ("IsWindowValid" , func (t * testing.T ) {
1585
+ b := v .NewBatch ()
1586
+
1587
+ var valid bool
1588
+ b .IsTabpageValid (Tabpage (0 ), & valid )
1589
+ if err := b .Execute (); err != nil {
1590
+ t .Fatal (err )
1591
+ }
1592
+
1593
+ if ! valid {
1594
+ t .Fatalf ("expected valid but got %t" , valid )
1595
+ }
1596
+ })
1545
1597
})
1546
1598
}
1547
1599
}
0 commit comments