annotate src/testdir/test31.in @ 9577:e3b6a4a87684 v7.4.2066

commit https://github.com/vim/vim/commit/c1fb763184c8ae82300357867fa2070aa94366e9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 17 23:34:21 2016 +0200 patch 7.4.2066 Problem: getcompletion() not well tested. Solution: Add more testing.
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jul 2016 23:45:05 +0200
parents ef60fac8f3eb
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 Test for commands that close windows and/or buffers:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 :quit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 :close
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 :hide
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 :only
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :sall
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 :all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 :ball
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 :buf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 :edit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 GA 1:$w! Xtest1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 $r2:$w! Xtest2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 $r3:$w! Xtest3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 :n! Xtest1 Xtest2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 A 1:set hidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 :" test for working :n when hidden set; write "testtext 2"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 :n
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 :w! test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 :" test for failing :rew when hidden not set; write "testtext 2 2"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 :set nohidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 A 2:rew
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 :" test for working :rew when hidden set; write "testtext 1 1"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 :set hidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 :rew
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 :" test for :all keeping a buffer when it's modified; write "testtext 1 1 1"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 :set nohidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 A 1:sp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 :n Xtest2 Xtest3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 :all
730
44348703ab1b updated for version 7.0221
vimboss
parents: 7
diff changeset
35 :1wincmd w
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 :" test abandoning changed buffer, should be unloaded even when 'hidden' set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 :" write "testtext 2 2" twice
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 :set hidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 A 1:q!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 :unhide
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 :" test ":hide" hides anyway when 'hidden' not set; write "testtext 3"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 :set nohidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 A 2:hide
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 :" test ":edit" failing in modified buffer when 'hidden' not set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 :" write "testtext 3 3"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 A 3:e Xtest1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 :" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 :set hidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 :e Xtest1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 :" test ":close" not hiding when 'hidden' not set in modified buffer;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 :" write "testtext 3 3 3"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 :sp Xtest3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 :set nohidden
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 A 3:close
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 :w >>test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 :" test ":close!" does hide when 'hidden' not set in modified buffer;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 :" write "testtext 1"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 A 3:close!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 :w >>test.out
3354
72146e7f47fa updated for version 7.3.444
Bram Moolenaar <bram@vim.org>
parents: 730
diff changeset
66 :set nohidden
72146e7f47fa updated for version 7.3.444
Bram Moolenaar <bram@vim.org>
parents: 730
diff changeset
67 :" test ":all!" hides changed buffer; write "testtext 2 2 2"
72146e7f47fa updated for version 7.3.444
Bram Moolenaar <bram@vim.org>
parents: 730
diff changeset
68 :sp Xtest4
72146e7f47fa updated for version 7.3.444
Bram Moolenaar <bram@vim.org>
parents: 730
diff changeset
69 GA 4:all!
72146e7f47fa updated for version 7.3.444
Bram Moolenaar <bram@vim.org>
parents: 730
diff changeset
70 :1wincmd w
72146e7f47fa updated for version 7.3.444
Bram Moolenaar <bram@vim.org>
parents: 730
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 testtext