856
|
1 Tests for tab pages
|
|
2
|
|
3 STARTTEST
|
|
4 :so small.vim
|
|
5 :" Simple test for opening and closing a tab page
|
|
6 :tabnew
|
|
7 :let nr = tabpagenr()
|
|
8 :q
|
|
9 :call append(line('$'), 'tab page ' . nr)
|
|
10 :"
|
|
11 :" Open three tab pages and use ":tabdo"
|
|
12 :0tabnew
|
|
13 :1tabnew
|
|
14 :888tabnew
|
|
15 :tabdo call append(line('$'), 'this is tab page ' . tabpagenr())
|
|
16 :tabclose! 2
|
|
17 :tabrewind
|
|
18 :let line1 = getline('$')
|
|
19 :undo
|
|
20 :q
|
|
21 :tablast
|
|
22 :let line2 = getline('$')
|
|
23 :q!
|
|
24 :call append(line('$'), line1)
|
|
25 :call append(line('$'), line2)
|
|
26 :"
|
|
27 :"
|
|
28 :/^Results/,$w! test.out
|
|
29 :qa!
|
|
30 ENDTEST
|
|
31
|
|
32 Results:
|