annotate src/testdir/test31.in @ 2839:e1c5f69de95b v7.3.193

updated for version 7.3.193 Problem: In the command line window ":close" doesn't work properly. (Tony Mechelynck) Solution: Use Ctrl_C instead of K_IGNORE for cmdwin_result. (Jean-Rene David)
author Bram Moolenaar <bram@vim.org>
date Thu, 19 May 2011 14:50:54 +0200
parents 44348703ab1b
children 72146e7f47fa
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 :so tiny.vim
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 testtext