Skip to content

Commit ac90e80

Browse files
committed
nvim: add WindowOption testcase
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 993b6ee commit ac90e80

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

nvim/api_test.go

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,7 +3095,6 @@ func testFloatingWindow(v *Nvim) func(*testing.T) {
30953095
t.Fatalf("got %d height but want %d", gotHeight, wantHeight)
30963096
}
30973097

3098-
batch := v.NewBatch()
30993098
var (
31003099
numberOpt bool
31013100
relativenumberOpt bool
@@ -3106,15 +3105,28 @@ func testFloatingWindow(v *Nvim) func(*testing.T) {
31063105
signcolumnOpt string
31073106
colorcolumnOpt string
31083107
)
3109-
batch.WindowOption(w, "number", &numberOpt)
3110-
batch.WindowOption(w, "relativenumber", &relativenumberOpt)
3111-
batch.WindowOption(w, "cursorline", &cursorlineOpt)
3112-
batch.WindowOption(w, "cursorcolumn", &cursorcolumnOpt)
3113-
batch.WindowOption(w, "spell", &spellOpt)
3114-
batch.WindowOption(w, "list", &listOpt)
3115-
batch.WindowOption(w, "signcolumn", &signcolumnOpt)
3116-
batch.WindowOption(w, "colorcolumn", &colorcolumnOpt)
3117-
if err := batch.Execute(); err != nil {
3108+
if err := v.WindowOption(w, "number", &numberOpt); err != nil {
3109+
t.Fatal(err)
3110+
}
3111+
if err := v.WindowOption(w, "relativenumber", &relativenumberOpt); err != nil {
3112+
t.Fatal(err)
3113+
}
3114+
if err := v.WindowOption(w, "cursorline", &cursorlineOpt); err != nil {
3115+
t.Fatal(err)
3116+
}
3117+
if err := v.WindowOption(w, "cursorcolumn", &cursorcolumnOpt); err != nil {
3118+
t.Fatal(err)
3119+
}
3120+
if err := v.WindowOption(w, "spell", &spellOpt); err != nil {
3121+
t.Fatal(err)
3122+
}
3123+
if err := v.WindowOption(w, "list", &listOpt); err != nil {
3124+
t.Fatal(err)
3125+
}
3126+
if err := v.WindowOption(w, "signcolumn", &signcolumnOpt); err != nil {
3127+
t.Fatal(err)
3128+
}
3129+
if err := v.WindowOption(w, "colorcolumn", &colorcolumnOpt); err != nil {
31183130
t.Fatal(err)
31193131
}
31203132
if numberOpt || relativenumberOpt || cursorlineOpt || cursorcolumnOpt || spellOpt || listOpt || signcolumnOpt != "auto" || colorcolumnOpt != "" {

0 commit comments

Comments
 (0)