annotate src/testdir/test13.in @ 9858:3e96d9ed2ca1 v7.4.2204

commit https://github.com/vim/vim/commit/b5ae48e9ffd3b8eb6ca4057de11f1bddcde8ce6f Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 12 22:23:25 2016 +0200 patch 7.4.2204 Problem: It is not easy to get information about buffers, windows and tabpages. Solution: Add getbufinfo(), getwininfo() and gettabinfo(). (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Fri, 12 Aug 2016 22:30:07 +0200
parents 0229cfffc560
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 Tests for autocommands on :close command
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 Write three files and open them, each in a window.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 Then go to next window, with autocommand that deletes the previous one.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 Do this twice, writing the file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 Also test deleting the buffer on a Unload event. If this goes wrong there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 will be the ATTENTION prompt.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 Also test changing buffers in a BufDel autocommand. If this goes wrong there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 are ml_line errors and/or a Crash.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 STARTTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 :so small.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 :/^start of testfile/,/^end of testfile/w! Xtestje1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 :/^start of testfile/,/^end of testfile/w! Xtestje2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 :/^start of testfile/,/^end of testfile/w! Xtestje3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 :e Xtestje1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 otestje1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 :w
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 :sp Xtestje2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 otestje2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 :w
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 :sp Xtestje3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 otestje3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 :w
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 :au WinLeave Xtestje2 bwipe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 :w! test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 :au WinLeave Xtestje1 bwipe Xtestje3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 :close
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 :e Xtestje1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 :bwipe Xtestje2 Xtestje3 test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 :au!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 :au! BufUnload Xtestje1 bwipe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 :e Xtestje3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 :e Xtestje2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 :sp Xtestje1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 :e
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 :au!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 :only
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 :e Xtestje1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 :bwipe Xtestje2 Xtestje3 test.out test13.in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 :au BufWipeout Xtestje1 buf Xtestje1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 :bwipe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 :w >>test.out
6838
0229cfffc560 patch 7.4.740
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
51 :only
0229cfffc560 patch 7.4.740
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
52 :help
0229cfffc560 patch 7.4.740
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
53 :wincmd w
0229cfffc560 patch 7.4.740
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
54 :1quit
0229cfffc560 patch 7.4.740
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
55 :$put ='Final line'
0229cfffc560 patch 7.4.740
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
56 :$w >>test.out
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 start of testfile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 contents
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 contents
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 contents
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 end of testfile