comparison src/testdir/test_tabpage.vim @ 13268:50e1077e0c3d v8.0.1508

patch 8.0.1508: the :drop command is not always available commit https://github.com/vim/vim/commit/5a656864a0610547da28e0c8c1649ecd1d782948 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 12 22:08:06 2018 +0100 patch 8.0.1508: the :drop command is not always available Problem: The :drop command is not always available. Solution: Include :drop in all builds. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/2639)
author Christian Brabandt <cb@256bit.org>
date Mon, 12 Feb 2018 22:15:05 +0100
parents a6a935b3270e
children 29bad8212db3
comparison
equal deleted inserted replaced
13267:707a355e635a 13268:50e1077e0c3d
39 39
40 tabnext 2 40 tabnext 2
41 call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green']) 41 call assert_true(t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green'])
42 tabclose 42 tabclose
43 43
44 if has('gui') || has('clientserver') 44 " Test for ":tab drop exist-file" to keep current window.
45 " Test for ":tab drop exist-file" to keep current window. 45 sp test1
46 sp test1 46 tab drop test1
47 tab drop test1 47 call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1)
48 call assert_true(tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1) 48 close
49 close 49 "
50 " 50 "
51 " 51 " Test for ":tab drop new-file" to keep current window of tabpage 1.
52 " Test for ":tab drop new-file" to keep current window of tabpage 1. 52 split
53 split 53 tab drop newfile
54 tab drop newfile 54 call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1)
55 call assert_true(tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1) 55 tabclose
56 tabclose 56 q
57 q 57 "
58 " 58 "
59 " 59 " Test for ":tab drop multi-opend-file" to keep current tabpage and window.
60 " Test for ":tab drop multi-opend-file" to keep current tabpage and window. 60 new test1
61 new test1 61 tabnew
62 tabnew 62 new test1
63 new test1 63 tab drop test1
64 tab drop test1 64 call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1)
65 call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1) 65 tabclose
66 tabclose 66 q
67 q 67 "
68 " 68 "
69 " 69 " Test for ":tab drop vertical-split-window" to jump test1 buffer
70 " Test for ":tab drop vertical-split-window" to jump test1 buffer 70 tabedit test1
71 tabedit test1 71 vnew
72 vnew 72 tabfirst
73 tabfirst 73 tab drop test1
74 tab drop test1 74 call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)])
75 call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)]) 75 1tabonly
76 1tabonly
77 endif
78 " 76 "
79 " 77 "
80 for i in range(9) | tabnew | endfor 78 for i in range(9) | tabnew | endfor
81 normal! 1gt 79 normal! 1gt
82 call assert_equal(1, tabpagenr()) 80 call assert_equal(1, tabpagenr())