Mercurial > vim
annotate src/testdir/test31.in @ 8847:470ea7526cc6 v7.4.1711
commit https://github.com/vim/vim/commit/a742e084b677f76c67e9e52c4f9fb9ab24002e20
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 5 21:10:38 2016 +0200
patch 7.4.1711
Problem: When using try/catch in 'statusline' it is still considered an
error and the status line will be disabled.
Solution: Check did_emsg instead of called_emsg. (haya14busa, closes https://github.com/vim/vim/issues/729)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 05 Apr 2016 21:15:05 +0200 |
parents | ef60fac8f3eb |
children |
rev | line source |
---|---|
7 | 1 Test for commands that close windows and/or buffers: |
2 :quit | |
3 :close | |
4 :hide | |
5 :only | |
6 :sall | |
7 :all | |
8 :ball | |
9 :buf | |
10 :edit | |
11 | |
12 STARTTEST | |
7473
ef60fac8f3eb
commit https://github.com/vim/vim/commit/d798af8c77cf47dba74b6b69ae4eba904023981c
Christian Brabandt <cb@256bit.org>
parents:
7469
diff
changeset
|
13 :so small.vim |
7 | 14 GA 1:$w! Xtest1 |
15 $r2:$w! Xtest2 | |
16 $r3:$w! Xtest3 | |
17 :n! Xtest1 Xtest2 | |
18 A 1:set hidden | |
19 :" test for working :n when hidden set; write "testtext 2" | |
20 :n | |
21 :w! test.out | |
22 :" test for failing :rew when hidden not set; write "testtext 2 2" | |
23 :set nohidden | |
24 A 2:rew | |
25 :w >>test.out | |
26 :" test for working :rew when hidden set; write "testtext 1 1" | |
27 :set hidden | |
28 :rew | |
29 :w >>test.out | |
30 :" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" | |
31 :set nohidden | |
32 A 1:sp | |
33 :n Xtest2 Xtest3 | |
34 :all | |
730 | 35 :1wincmd w |
7 | 36 :w >>test.out |
37 :" test abandoning changed buffer, should be unloaded even when 'hidden' set | |
38 :" write "testtext 2 2" twice | |
39 :set hidden | |
40 A 1:q! | |
41 :w >>test.out | |
42 :unhide | |
43 :w >>test.out | |
44 :" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" | |
45 :set nohidden | |
46 A 2:hide | |
47 :w >>test.out | |
48 :" test ":edit" failing in modified buffer when 'hidden' not set | |
49 :" write "testtext 3 3" | |
50 A 3:e Xtest1 | |
51 :w >>test.out | |
52 :" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" | |
53 :set hidden | |
54 :e Xtest1 | |
55 :w >>test.out | |
56 :" test ":close" not hiding when 'hidden' not set in modified buffer; | |
57 :" write "testtext 3 3 3" | |
58 :sp Xtest3 | |
59 :set nohidden | |
60 A 3:close | |
61 :w >>test.out | |
62 :" test ":close!" does hide when 'hidden' not set in modified buffer; | |
63 :" write "testtext 1" | |
64 A 3:close! | |
65 :w >>test.out | |
3354 | 66 :set nohidden |
67 :" test ":all!" hides changed buffer; write "testtext 2 2 2" | |
68 :sp Xtest4 | |
69 GA 4:all! | |
70 :1wincmd w | |
71 :w >>test.out | |
7469
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
72 :" |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
73 :" test ":q!" and hidden buffer. |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
74 :bw! Xtest1 Xtest2 Xtest3 Xtest4 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
75 :sp Xtest1 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
76 :wincmd w |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
77 :bw! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
78 :set modified |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
79 :bot sp Xtest2 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
80 :set modified |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
81 :bot sp Xtest3 |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
82 :set modified |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
83 :wincmd t |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
84 :hide |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
85 :q! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
86 :w >>test.out |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
87 :q! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
88 :w >>test.out |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
89 :q! |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
90 :call append(line('$'), "Oh, Not finished yet.") |
15eefe1b0dad
commit https://github.com/vim/vim/commit/027387f70c671f62e3e08e0bdd09ec05b0232735
Christian Brabandt <cb@256bit.org>
parents:
3354
diff
changeset
|
91 :w >>test.out |
7 | 92 :qa! |
93 ENDTEST | |
94 | |
95 testtext |