annotate src/testdir/test13.in @ 8761:f8707ec9efe4 v7.4.1669

commit https://github.com/vim/vim/commit/8b877ac38e96424a08a8b8eb713ef4b3cf0064be Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 28 19:16:20 2016 +0200 patch 7.4.1669 Problem: When writing buffer lines to a pipe Vim may block. Solution: Avoid blocking, write more lines later.
author Christian Brabandt <cb@256bit.org>
date Mon, 28 Mar 2016 19:30:05 +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