@@ -41,40 +41,38 @@ function Test_tabpage()
4141 call assert_true (t :val_num == 100 && t :val_str == ' SetTabVar test' && t :val_list == [' red' , ' blue' , ' green' ])
4242 tabclose
4343
44- if has (' gui' ) || has (' clientserver' )
45- " Test for ":tab drop exist-file" to keep current window.
46- sp test1
47- tab drop test1
48- call assert_true (tabpagenr (' $' ) == 1 && winnr (' $' ) == 2 && winnr () == 1 )
49- close
50- "
51- "
52- " Test for ":tab drop new-file" to keep current window of tabpage 1.
53- split
54- tab drop newfile
55- call assert_true (tabpagenr (' $' ) == 2 && tabpagewinnr (1 , ' $' ) == 2 && tabpagewinnr (1 ) == 1 )
56- tabclose
57- q
58- "
59- "
60- " Test for ":tab drop multi-opend-file" to keep current tabpage and window.
61- new test1
62- tabnew
63- new test1
64- tab drop test1
65- call assert_true (tabpagenr () == 2 && tabpagewinnr (2 , ' $' ) == 2 && tabpagewinnr (2 ) == 1 )
66- tabclose
67- q
68- "
69- "
70- " Test for ":tab drop vertical-split-window" to jump test1 buffer
71- tabedit test1
72- vnew
73- tabfirst
74- tab drop test1
75- call assert_equal ([2 , 2 , 2 , 2 ], [tabpagenr (' $' ), tabpagenr (), tabpagewinnr (2 , ' $' ), tabpagewinnr (2 )])
76- 1 tabonly
77- endif
44+ " Test for ":tab drop exist-file" to keep current window.
45+ sp test1
46+ tab drop test1
47+ call assert_true (tabpagenr (' $' ) == 1 && winnr (' $' ) == 2 && winnr () == 1 )
48+ close
49+ "
50+ "
51+ " Test for ":tab drop new-file" to keep current window of tabpage 1.
52+ split
53+ tab drop newfile
54+ call assert_true (tabpagenr (' $' ) == 2 && tabpagewinnr (1 , ' $' ) == 2 && tabpagewinnr (1 ) == 1 )
55+ tabclose
56+ q
57+ "
58+ "
59+ " Test for ":tab drop multi-opend-file" to keep current tabpage and window.
60+ new test1
61+ tabnew
62+ new test1
63+ tab drop test1
64+ call assert_true (tabpagenr () == 2 && tabpagewinnr (2 , ' $' ) == 2 && tabpagewinnr (2 ) == 1 )
65+ tabclose
66+ q
67+ "
68+ "
69+ " Test for ":tab drop vertical-split-window" to jump test1 buffer
70+ tabedit test1
71+ vnew
72+ tabfirst
73+ tab drop test1
74+ call assert_equal ([2 , 2 , 2 , 2 ], [tabpagenr (' $' ), tabpagenr (), tabpagewinnr (2 , ' $' ), tabpagewinnr (2 )])
75+ 1 tabonly
7876 "
7977 "
8078 for i in range (9 ) | tabnew | endfor
0 commit comments