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)
|
1405
|
10 :unlet nr
|
856
|
11 :"
|
|
12 :" Open three tab pages and use ":tabdo"
|
|
13 :0tabnew
|
|
14 :1tabnew
|
|
15 :888tabnew
|
|
16 :tabdo call append(line('$'), 'this is tab page ' . tabpagenr())
|
|
17 :tabclose! 2
|
|
18 :tabrewind
|
|
19 :let line1 = getline('$')
|
|
20 :undo
|
|
21 :q
|
|
22 :tablast
|
|
23 :let line2 = getline('$')
|
|
24 :q!
|
|
25 :call append(line('$'), line1)
|
|
26 :call append(line('$'), line2)
|
1405
|
27 :unlet line1 line2
|
856
|
28 :"
|
|
29 :"
|
|
30 :/^Results/,$w! test.out
|
|
31 :qa!
|
|
32 ENDTEST
|
|
33
|
|
34 Results:
|