File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -3485,6 +3485,25 @@ func testFloatingWindow(v *Nvim) func(*testing.T) {
3485
3485
t .Fatalf ("got %d height but want %d" , gotHeight , wantHeight )
3486
3486
}
3487
3487
3488
+ wantWinConfig := & WindowConfig {
3489
+ Relative : "editor" ,
3490
+ Anchor : "NW" ,
3491
+ Width : 40 ,
3492
+ Height : 10 ,
3493
+ Row : 1 ,
3494
+ Focusable : false ,
3495
+ }
3496
+ if err := v .SetWindowConfig (w , wantWinConfig ); err != nil {
3497
+ t .Fatal (err )
3498
+ }
3499
+ gotWinConfig , err := v .WindowConfig (w )
3500
+ if err != nil {
3501
+ t .Fatal (err )
3502
+ }
3503
+ if ! reflect .DeepEqual (gotWinConfig , wantWinConfig ) {
3504
+ t .Fatalf ("want %#v but got %#v" , wantWinConfig , gotWinConfig )
3505
+ }
3506
+
3488
3507
var (
3489
3508
numberOpt bool
3490
3509
relativenumberOpt bool
@@ -3582,6 +3601,28 @@ func testFloatingWindow(v *Nvim) func(*testing.T) {
3582
3601
t .Fatalf ("got %d height but want %d" , gotHeight , wantHeight )
3583
3602
}
3584
3603
3604
+ wantWinConfig := & WindowConfig {
3605
+ Relative : "editor" ,
3606
+ Anchor : "NW" ,
3607
+ Width : 40 ,
3608
+ Height : 10 ,
3609
+ Row : 1 ,
3610
+ Focusable : false ,
3611
+ }
3612
+ b .SetWindowConfig (w , wantWinConfig )
3613
+ if err := b .Execute (); err != nil {
3614
+ t .Fatal (err )
3615
+ }
3616
+
3617
+ gotWinConfig := new (WindowConfig )
3618
+ b .WindowConfig (w , gotWinConfig )
3619
+ if err := b .Execute (); err != nil {
3620
+ t .Fatal (err )
3621
+ }
3622
+ if ! reflect .DeepEqual (gotWinConfig , wantWinConfig ) {
3623
+ t .Fatalf ("want %#v but got %#v" , wantWinConfig , gotWinConfig )
3624
+ }
3625
+
3585
3626
var (
3586
3627
numberOpt bool
3587
3628
relativenumberOpt bool
You can’t perform that action at this time.
0 commit comments